Mercurial > dotfiles
comparison .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 |
comparison
equal
deleted
inserted
replaced
114:d4845549ed7c | 115:5f00625aa1ed |
---|---|
119 for aa in */ ; do | 119 for aa in */ ; do |
120 pushd $aa > /dev/null || continue | 120 pushd $aa > /dev/null || continue |
121 if [ -e .svn ] ; then | 121 if [ -e .svn ] ; then |
122 echo $aa 'is an svn checkout, updating' | 122 echo $aa 'is an svn checkout, updating' |
123 svn up | 123 svn up |
124 elif [ -e README.txt ] \ | |
125 && [ -e format ] \ | |
126 && grep "This is a Subversion repository; use the 'svnadmin' tool to examine" README.txt > /dev/null \ | |
127 && svn pl --revprop -r 0 file://$(pwd) | fgrep svn:sync-from-url > /dev/null\ | |
128 ; then | |
129 echo "$aa looks like an svnsync clone, syncing" | |
130 svnsync sync file://$(pwd) | |
124 elif [ -e .git/svn ] ; then | 131 elif [ -e .git/svn ] ; then |
125 echo $aa 'is a git-svn checkout, updating' | 132 echo $aa 'is a git-svn checkout, updating' |
126 git svn fetch | 133 git svn fetch |
127 git repack | 134 git repack |
128 git gc | 135 git gc |
141 echo $aa "is an mtn co, updating" && mtn pull && mtn up | 148 echo $aa "is an mtn co, updating" && mtn pull && mtn up |
142 fi | 149 fi |
143 popd > /dev/null | 150 popd > /dev/null |
144 done | 151 done |
145 } | 152 } |
153 alias update-source-trees=update_source_trees | |
146 | 154 |
147 function vcs_current_branch() { | 155 function vcs_current_branch() { |
148 git branch 2> /dev/null > /dev/null | 156 git branch 2> /dev/null > /dev/null |
149 if [ $? = 0 ] ; then | 157 if [ $? = 0 ] ; then |
150 git branch --verbose | grep '^*' | sed 's/* //;s/ /:/;s/ .*//;s/:/ /' | 158 git branch --verbose | grep '^*' | sed 's/* //;s/ /:/;s/ .*//;s/:/ /' |