tests/test-bisect
author Matt Mackall <mpm@selenic.com>
Mon, 31 Dec 2007 18:20:34 -0600
changeset 5776 35ec669cdd43
parent 5775 2dd202a6e15b
child 5777 51776e50bc8c
permissions -rwxr-xr-x
bisect: handle search for bad to good transitions Automatically detect whether we're looking for a bad to good transition rather than the usual good to bad transition by detecting when badrev is inside the good set and flipping good/bad.

#!/bin/sh

set -e

echo % init
hg init

echo % committing changes
count=0
echo > a
while test $count -lt 32 ; do
    echo 'a' >> a
    test $count -eq 0 && hg add
    hg ci -m "msg $count" -d "$count 0"
    echo % committed changeset $count
    count=`expr $count + 1`
done

echo % log
hg log

echo % hg up -C
hg up -C

echo % bisect test
hg bisect -r
hg bisect -b
hg bisect -g 1
hg bisect -g
hg bisect -g
hg bisect -g
hg bisect -b
hg bisect -g

echo % bisect reverse test
hg bisect -r
hg bisect -b null
hg bisect -g tip
hg bisect -g
hg bisect -g
hg bisect -g
hg bisect -b
hg bisect -g