test-merge1
86 lines
| 1.5 KiB
| text/plain
|
TextLexer
/ tests / test-merge1
|
r407 | #!/bin/sh -x | ||
cat <<'EOF' > merge | ||||
#!/bin/sh | ||||
echo merging for `basename $1` | ||||
EOF | ||||
chmod +x merge | ||||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
|
r749 | hg commit -m "commit #0" -d "0 0" | ||
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
|
r749 | hg commit -m "commit #1" -d "0 0" | ||
|
r407 | |||
hg update 0 | ||||
echo This is file c1 > c | ||||
hg add c | ||||
|
r749 | hg commit -m "commit #2" -d "0 0" | ||
|
r407 | echo This is file b1 > b | ||
env HGMERGE=../merge hg update -m 1 | ||||
# no merges expected | ||||
cd ..; /bin/rm -rf t | ||||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
|
r749 | hg commit -m "commit #0" -d "0 0" | ||
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
|
r749 | hg commit -m "commit #1" -d "0 0" | ||
|
r407 | |||
hg update 0 | ||||
echo This is file c1 > c | ||||
hg add c | ||||
|
r749 | hg commit -m "commit #2" -d "0 0" | ||
|
r407 | echo This is file b2 > b | ||
env HGMERGE=../merge hg update -m 1 | ||||
# merge of b expected | ||||
cd ..; /bin/rm -rf t | ||||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
|
r749 | hg commit -m "commit #0" -d "0 0" | ||
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
|
r749 | hg commit -m "commit #1" -d "0 0" | ||
|
r407 | echo This is file b22 > b | ||
|
r749 | hg commit -m "commit #2" -d "0 0" | ||
|
r407 | hg update 1 | ||
echo This is file c1 > c | ||||
hg add c | ||||
|
r749 | hg commit -m "commit #3" -d "0 0" | ||
|
r430 | cat b | ||
|
r407 | echo This is file b22 > b | ||
env HGMERGE=../merge hg update -m 2 | ||||
|
r430 | # merge expected! | ||
|
r407 | cd ..; /bin/rm -rf t | ||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
|
r749 | hg commit -m "commit #0" -d "0 0" | ||
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
|
r749 | hg commit -m "commit #1" -d "0 0" | ||
|
r407 | echo This is file b22 > b | ||
|
r749 | hg commit -m "commit #2" -d "0 0" | ||
|
r407 | hg update 1 | ||
echo This is file c1 > c | ||||
hg add c | ||||
|
r749 | hg commit -m "commit #3" -d "0 0" | ||
|
r407 | echo This is file b33 > b | ||
env HGMERGE=../merge hg update -m 2 | ||||
# merge of b expected | ||||
cd ..; /bin/rm -rf t | ||||