How to remove a local working copy of SVN?

I can’t just rm -rf $(find . -name '.svn') , because I have some directories in my working copy that have not returned (by svn: ignore) and at the same time working copies of other svn repositories .

my-repo
|+ directory
||- .svn (to delete)
||- files...
|+ another_directory
||- .svn (to delete)
||- files...
|+ directory_ignored (svn:ignore)
||- .svn (different working copy)
||- more files ...

So, I just want to say subversion to remove all .svn directories that belong only to this working copy.

Is it possible?

The directory structure is quite complicated, so doing it manually is really sucking.


Edit: The working solution is finally:

for i in $(export IFS=$'\n'; grep -l ' https://complete-repo-path/ ' find . -name entries|grep .svn | sed 's/ /\ /' | sed 's/.svn/entries//'); do echo $i.svn; >

+4
source share
1 answer

This seems like a workaround, but still ...

This will give you a list of directories containing the URL of your svn repository:

  grep -l 'https: // yourhost / svn / your_working_copy' `find.  -name entries | grep .svn` |  sed 's / \. svn \ / entries //' |  xargs echo

If it seems right to you, you can rm -rf after that

+1
source

Source: https://habr.com/ru/post/1306559/


All Articles