bash - svn update of directory with muliply repositories checkouts -
i have development directory contains checkouts svn repositories stays in non svn directories. update of dirs being in svns.
dir structure similar 1 below:
how solve issue?
i came "brute force" solution, not intelligent:
for in `find . -mindepth 1 -maxdepth 3 -type d | grep -v .svn`; svn $i; done
it nice have sth have:
svn --recursive update development_dir.
unfortunately, svn not support feature. can do, however, optimize command eliminating loop , piping grep. command should this:
find . -mindepth 1 -maxdepth 3 -name "*.svn" -type d -exec svn {}/.. \;
to make life easier, can set bash alias, example:
alias svn_up_recursive='find . -mindepth 1 \ -maxdepth 3 -name "*.svn" -type d -exec svn {}/.. \;'
... , invoke whole script svn_up_recursive
command. or create shell script , put bin
directory. prefer shell scripts easier support, extend them, process command line arguments etcetera.
Comments
Post a Comment