# HG changeset patch # User Augie Fackler # Date 1246317149 18000 # Node ID 5f00625aa1ed625fb877015a314cd6dacee6a985 # Parent d4845549ed7c37461a9c54ea4590ac349fbc56ac Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees diff --git a/.shell.d/50.vcs_functions.sh b/.shell.d/50.vcs_functions.sh --- a/.shell.d/50.vcs_functions.sh +++ b/.shell.d/50.vcs_functions.sh @@ -121,6 +121,13 @@ function update_source_trees() { if [ -e .svn ] ; then echo $aa 'is an svn checkout, updating' svn up + elif [ -e README.txt ] \ + && [ -e format ] \ + && grep "This is a Subversion repository; use the 'svnadmin' tool to examine" README.txt > /dev/null \ + && svn pl --revprop -r 0 file://$(pwd) | fgrep svn:sync-from-url > /dev/null\ + ; then + echo "$aa looks like an svnsync clone, syncing" + svnsync sync file://$(pwd) elif [ -e .git/svn ] ; then echo $aa 'is a git-svn checkout, updating' git svn fetch @@ -143,6 +150,7 @@ function update_source_trees() { popd > /dev/null done } +alias update-source-trees=update_source_trees function vcs_current_branch() { git branch 2> /dev/null > /dev/null