From: Junio C Hamano Date: Sun, 15 Jan 2006 02:17:54 +0000 (-0800) Subject: Make sure master <= naster <= pu, and avoid duplicate builds. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=0f0fc5783b1620033c10b7747a2359ce3ac62978;p=git.git Make sure master <= naster <= pu, and avoid duplicate builds. Signed-off-by: Junio C Hamano --- diff --git a/Doit b/Doit index aaa1ee17..5e14c7c1 100755 --- a/Doit +++ b/Doit @@ -6,22 +6,44 @@ test -z "$(git diff --cached --name-status)" || { echo >&2 "Repository unclean." exit 1 } +Meta/Make clean >/dev/null 2>&1 + +branches='naster master maint' + +# Make sure naster is between master and pu if exists +if naster=`git rev-parse --verify refs/heads/naster 2>/dev/null` +then + master=`git rev-parse --verify refs/heads/master` && + pu=`git rev-parse --verify refs/heads/pu` && + MBM=`git merge-base --all $naster $master` && + MBN=`git merge-base --all $naster $pu` && + case ",$MBM,$MBN," in + ",$master,$naster,") ;; + *) echo >&2 "naster is not between master and pu" + exit 1 ;; + esac + # If naster is the same as pu, no point rebuilding pu. + case ",$naster,$pu," in + ",$pu,$naster,") ;; + *) branches="$branches pu" ;; + esac +fi nstall=install -for branch in naster master maint pu +for branch in $branches do - rm -f ./:$branch.log && if git rev-parse --verify refs/heads/$branch 2>/dev/null then echo "* $branch" && - git checkout $branch || break - { - Meta/Make $J $nstall && - Meta/Make test && - Meta/Make clean - } >./:$branch.log && + git checkout $branch && + Meta/Make $J all && + Meta/Make $J $nstall && + Meta/Make test && + Meta/Make clean && nstall=all || exit $? else echo "* No $branch" fi -done +done >./:all.log 2>&1 + +