Clears the SVN information from the directory

Source: Internet
Author: User

Today you need to migrate subdirectories from one repository to the new repository, so you don't need to keep the log information, so just submit the latest code.

For the removal of SVN information in the directory, find some methods on the web and practice the following:

Under Linux

Deleting these directories is simple and the command is as follows
Find. -type d-name ". SVN" |xargs RM-RF

Or

Find. -type d-iname ". SVN"-exec rm-rf {} \;

You can use the following batch scripts under Windows

@echo off
Echo ***********************************************************
echo Clears SVN version information
Echo ***********************************************************
: Start
:: Start the process, switch directories
Set pwd=%cd%
If not exist%1 echo specified directory does not exist & Goto end
CD%1
Echo working directory is:& chdir
: input
:: Get input, process according to input
Set source=:
set/p source= Are you sure you want to know the. SVN information in the current directory? [y/n/q]
Set "Source=%source:" =% "
If "%source%" = = "Y" goto clean
If "%source%" = = "Y" goto clean
If "%source%" = = "n" Goto Noclean
If "%source%" = = "N" goto Noclean
If "%source%" = = "Q" goto end
If "%source%" = = "Q" goto end
Goto input
: Clean
:: Master process, performing cleanup work
@echo on
@for/d/R%%c in (. svn) do @if exist%%c (rd/s/q%%c & Echo Delete directory%%c)
@echo off
echo "SVN information in current directory cleared"
Goto END
: Noclean
:: Branching process, canceling cleanup work
echo "SVN information clear Operation canceled"
Goto END
: End
:: Exit Program
CD "%pwd%"
Pause

Clears the SVN information from the directory

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.