view tests/test-merge7 @ 1351:0e2be889ccd7

Repair ancestor logic, fix up test cases
author Matt Mackall <mpm@selenic.com>
date Mon, 26 Sep 2005 16:52:47 -0700
parents
children bf6c91cb816f
line wrap: on
line source

#!/bin/sh

# initial
hg init test-a
cd test-a
cat >test.txt <<"EOF"
1
2
3
EOF
hg add test.txt
hg commit -m "Initial" -d "0 0"

# clone
cd ..
hg clone test-a test-b

# change test-a
cd test-a
cat >test.txt <<"EOF"
one
two
three
EOF
hg commit -m "Numbers as words" -d "0 0"

# change test-b
cd ../test-b
cat >test.txt <<"EOF"
1
2.5
3
EOF
hg commit -m "2 -> 2.5" -d "0 0"

# now pull and merge from test-a
hg pull
HGMERGE=merge hg update -m
# resolve conflict
cat >test.txt <<"EOF"
one
two-point-five
three
EOF
rm -f *.orig
hg commit -m "Merge 1" -d "0 0"

# change test-a again
cd ../test-a
cat >test.txt <<"EOF"
one
two-point-one
three
EOF
hg commit -m "two -> two-point-one"

# pull and merge from test-a again
cd ../test-b
hg pull
HGMERGE=merge hg update --debug -m

cat test.txt

hg debugindex .hg/data/test.txt.i

hg log