test-merge7
66 lines
| 897 B
| text/plain
|
TextLexer
/ tests / test-merge7
|
r1351 | #!/bin/sh | ||
# initial | ||||
hg init test-a | ||||
cd test-a | ||||
cat >test.txt <<"EOF" | ||||
1 | ||||
2 | ||||
3 | ||||
EOF | ||||
hg add test.txt | ||||
|
r1933 | hg commit -m "Initial" -d "1000000 0" | ||
|
r1351 | |||
# clone | ||||
cd .. | ||||
hg clone test-a test-b | ||||
# change test-a | ||||
cd test-a | ||||
cat >test.txt <<"EOF" | ||||
one | ||||
two | ||||
three | ||||
EOF | ||||
|
r1933 | hg commit -m "Numbers as words" -d "1000000 0" | ||
|
r1351 | |||
# change test-b | ||||
cd ../test-b | ||||
cat >test.txt <<"EOF" | ||||
1 | ||||
2.5 | ||||
3 | ||||
EOF | ||||
|
r1933 | hg commit -m "2 -> 2.5" -d "1000000 0" | ||
|
r1351 | |||
# now pull and merge from test-a | ||||
|
r1352 | hg pull ../test-a | ||
|
r2283 | HGMERGE=merge hg merge | ||
|
r1351 | # resolve conflict | ||
cat >test.txt <<"EOF" | ||||
one | ||||
two-point-five | ||||
three | ||||
EOF | ||||
rm -f *.orig | ||||
|
r1933 | hg commit -m "Merge 1" -d "1000000 0" | ||
|
r1351 | |||
# change test-a again | ||||
cd ../test-a | ||||
cat >test.txt <<"EOF" | ||||
one | ||||
two-point-one | ||||
three | ||||
EOF | ||||
|
r1933 | hg commit -m "two -> two-point-one" -d "1000000 0" | ||
|
r1351 | |||
# pull and merge from test-a again | ||||
cd ../test-b | ||||
|
r1352 | hg pull ../test-a | ||
|
r2283 | HGMERGE=merge hg merge --debug | ||
|
r1351 | |||
|
r1352 | cat test.txt | sed "s% .*%%" | ||
|
r1351 | |||
|
r3853 | hg debugindex .hg/store/data/test.txt.i | ||
|
r1351 | |||
hg log | ||||