# HG changeset patch # User Augie Fackler # Date 1238615438 18000 # Node ID 9f8bd97da0d4f1e2a710237f171c042b5acfdb8d # Parent 31a11febd7519de0763e9c32696185489323af0d hg-svn-rebase-all: improved rebasing so that merges no longer abort rebasing other branches. 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 @@ -57,7 +57,18 @@ function hg-svn-merge-branch() { function hg-svn-rebase-all() { for b in `hg llog -u 'Augie Fackler ' --template '{branches}\n' | sort | uniq` do - hg co $b && hg svn rebase || return + echo "rebase $b" + hg co $b + if [[ "$?" != "0" ]] ; then + echo "abort: could not checkout $b" + return + fi + hg parent --svn > /dev/null + if [[ "$?" == "0" ]] ; then + hg svn rebase || return + else + echo "Skip $b since it has a merge." + fi done }