tests/test-merge2
author Martin Geisler <mg@lazybytes.net>
Sun, 27 Jun 2010 23:12:05 +0200
branchstable
changeset 11451 51021f4c80b5
parent 3988 9dcf9d45cab8
permissions -rwxr-xr-x
resolve: do not crash on empty mergestate I managed to get an empty .hg/merge/state file by interrupting a merge by pressing Control-C. This lead to this error: TypeError: a2b_hex() argument 1 must be string or read-only buffer, not None since localnode is assigned None before the iteration over lines in the mergestate begins.

#!/bin/sh

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg add b
hg commit -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"
cd ..; rm -r t

mkdir t
cd t
hg init
echo This is file a1 > a
hg add a
hg commit -m "commit #0" -d "1000000 0"
echo This is file b1 > b
hg add b
hg commit -m "commit #1" -d "1000000 0"
rm b
hg remove b
hg update 0
echo This is file b2 > b
hg commit -A -m "commit #2" -d "1000000 0"