[oe-commits] org.oe.dev mtn-bisect.sh

likewise commit oe at amethyst.openembedded.net
Tue May 20 20:28:00 UTC 2008


mtn-bisect.sh

Author: likewise at openembedded.org
Branch: org.openembedded.dev
Revision: 635b19191517f99ee151ae6157a22f5d56406238
ViewMTN: http://monotone.openembedded.org/revision/info/635b19191517f99ee151ae6157a22f5d56406238
Files:
1
contrib/mtn-bisect.sh
mtn:execute
true
Diffs:

#
# mt diff -r9cb48c162717430109870fb9eea210df9f75c47a -r635b19191517f99ee151ae6157a22f5d56406238
#
#
#
# add_file "contrib/mtn-bisect.sh"
#  content [230e3a1f735e3f6f46b4f117657494175ee86928]
# 
#   set "contrib/mtn-bisect.sh"
#  attr "mtn:execute"
# value "true"
#
============================================================
--- contrib/mtn-bisect.sh	230e3a1f735e3f6f46b4f117657494175ee86928
+++ contrib/mtn-bisect.sh	230e3a1f735e3f6f46b4f117657494175ee86928
@@ -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
+
+






More information about the Openembedded-commits mailing list