diff .shell.d/50.vcs_functions.sh @ 115:5f00625aa1ed

Add support for svnsync to update_source_trees, alias update_source_trees to update-source-trees
author Augie Fackler <durin42@gmail.com>
date Mon, 29 Jun 2009 18:12:29 -0500
parents 568f9f350844
children 1286c27cf0c0
line wrap: on
line diff
--- 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