From e051dd74e9a5ed818d1d57af551e36434d83c5fa Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 5 Apr 2012 16:32:20 -0400 Subject: [PATCH] implement repo-wide rb all --- .bin/r | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.bin/r b/.bin/r index 68d624a..518b266 100755 --- a/.bin/r +++ b/.bin/r @@ -14,6 +14,10 @@ case ${acmd:-${cmd}} in rebase) if [[ $1 == "all" ]] ; then shift + if [[ $# -eq 0 ]] ; then + exec r forall -c 'r rb all .' + fi + branches=$(g b | awk ' { if ($0 ~ "^[*] *[(]no branch[)]") { @@ -25,10 +29,16 @@ rebase) } } END { print list b }') + [[ -z ${branches} ]] && exit 0 + + eval $(bash-colors --env) + echo "${GOOD}### ${PWD}${NORMAL}" for b in ${branches} ; do - echo " ### $b" + echo " ${HILITE}### $b${NORMAL}" g co $b || exit 1 - r rb "$@" || exit 1 + if ! r rb "$@" ; then + g rb-a + fi done exit 0 fi -- 2.39.5