comparison .shell.d/50.vcs_functions.sh @ 67:9f8bd97da0d4

hg-svn-rebase-all: improved rebasing so that merges no longer abort rebasing other branches.
author Augie Fackler <durin42@gmail.com>
date Wed, 01 Apr 2009 14:50:38 -0500
parents 1b4067cc97ca
children 5232fa3d7ad3
comparison
equal deleted inserted replaced
66:31a11febd751 67:9f8bd97da0d4
55 } 55 }
56 56
57 function hg-svn-rebase-all() { 57 function hg-svn-rebase-all() {
58 for b in `hg llog -u 'Augie Fackler <durin42@gmail.com>' --template '{branches}\n' | sort | uniq` 58 for b in `hg llog -u 'Augie Fackler <durin42@gmail.com>' --template '{branches}\n' | sort | uniq`
59 do 59 do
60 hg co $b && hg svn rebase || return 60 echo "rebase $b"
61 hg co $b
62 if [[ "$?" != "0" ]] ; then
63 echo "abort: could not checkout $b"
64 return
65 fi
66 hg parent --svn > /dev/null
67 if [[ "$?" == "0" ]] ; then
68 hg svn rebase || return
69 else
70 echo "Skip $b since it has a merge."
71 fi
61 done 72 done
62 } 73 }
63 74
64 function hg-ammend() { 75 function hg-ammend() {
65 hg qimport -r . && hg qref && hg qfin qtip 76 hg qimport -r . && hg qref && hg qfin qtip