view tests/test-merge7 @ 2051:6a03cff2b0f5 0.8.1

Try to use /usr/bin/test or /bin/test to work around missing features. The builtin "test" of Solaris 8 /bin/sh doesn't understand -nt.
author Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>
date Fri, 07 Apr 2006 22:31:54 +0200
parents 7544700fd931
children e506c14382fd
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 "1000000 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 "1000000 0"

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

# now pull and merge from test-a
hg pull ../test-a
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 "1000000 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" -d "1000000 0"

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

cat test.txt | sed "s% .*%%"

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

hg log