简体   繁体   中英

How to cleanup an SVN checkout with lots of locks in externals

At the moment svn cleanup doesn't go into externals according to this bug . What's the best way to remove all the checkout locks from a project and all it's externals?

My best attempt is:

svn propget svn:externals |\
  grep '^[^# ]' |\
  cut -d ' ' -f 1 |\
  while read dir; do (cd $dir && svn cleanup); done

run at the level that the externals are defined (which works for me).

I'm sure there is a better regex or format specifier you can pass to svn status , but I end up pruning the first 8 characters and passing to xargs for lots of things (externals list, modified files, etc.). For this particular example, I'd do:

svn st | grep ^X | sed 's/........//' | xargs svn cleanup

If I have a known list of directories, I'll sometimes also use a foreach:

for m in `cat modules`; do svn something $m; done

or

for m in one two three; do svn something $m; done

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM