diff options
author | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-20 20:22:44 +0000 |
---|---|---|
committer | Leon Woestenberg <leon.woestenberg@gmail.com> | 2008-05-20 20:22:44 +0000 |
commit | e93dabbb3ecc45cfd55f5ef103479e2b3d4ccd1e (patch) | |
tree | faa0535ca79daef0cb8063354515d71440b6a2fe /contrib | |
parent | bcddbb9aaf2369a82a79b847b3be18ac820ce6e7 (diff) |
mtn-bisect.sh
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mtn-bisect.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/mtn-bisect.sh b/contrib/mtn-bisect.sh new file mode 100755 index 0000000000..e1c970d974 --- /dev/null +++ b/contrib/mtn-bisect.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# the revision that we noticed does not longer build +LATEST_BAD_REV=$1 + +# an older revision that is known to build +LAST_KNOWN_GOOD_REV=$2 + +# count the number of commits +COUNT=`mtn log --brief --no-merges --no-graph --to p:$LAST_KNOWN_GOOD_REV --from $LATEST_BAD_REV | tee /tmp/candidates.txt | wc -l` + +echo $COUNT commits + +# if COUNT == 1 stop + +# make binary sections +COUNT=$(($(($COUNT + 1)) / 2)) + +CANDIDATE_REV=`cat /tmp/candidates.txt | head -n $COUNT | tail -n 1 | sed -e 's@\([a-f0-9]*\) .*@\1@'` + +echo $CANDIDATE_REV + +echo mtn up -r $CANDIDATE_REV +mtn up -r $CANDIDATE_REV + + |