mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +03:00
274bce0c1c
This should give us conflict markers that don't change from one run to another. Remove some sed's/egrep's from some tests.
67 lines
853 B
Bash
Executable File
67 lines
853 B
Bash
Executable File
#!/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
|
|
hg merge
|
|
# 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
|
|
hg merge --debug
|
|
|
|
cat test.txt
|
|
|
|
hg debugindex .hg/store/data/test.txt.i
|
|
|
|
hg log
|