test-merge1
96 lines
| 1.9 KiB
| text/plain
|
TextLexer
/ tests / test-merge1
Thomas Arendsen Hein
|
r800 | #!/bin/sh | ||
mpm@selenic.com
|
r407 | |||
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 | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #0" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #1" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | |||
hg update 0 | ||||
echo This is file c1 > c | ||||
hg add c | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #2" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b1 > b | ||
mpm@selenic.com
|
r1236 | echo %% no merges expected | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge 1 | ||
mpm@selenic.com
|
r407 | cd ..; /bin/rm -rf t | ||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #0" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #1" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | |||
hg update 0 | ||||
echo This is file c1 > c | ||||
hg add c | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #2" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b2 > b | ||
Benoit Boissinot
|
r1581 | echo %% merge should fail | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge 1 | ||
mpm@selenic.com
|
r1236 | echo %% merge of b expected | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge -f 1 | ||
mpm@selenic.com
|
r407 | cd ..; /bin/rm -rf t | ||
mpm@selenic.com
|
r1236 | echo %% | ||
mpm@selenic.com
|
r407 | |||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #0" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #1" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b22 > b | ||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #2" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | hg update 1 | ||
echo This is file c1 > c | ||||
hg add c | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #3" -d "1000000 0" | ||
mpm@selenic.com
|
r1236 | |||
echo 'Contents of b should be "this is file b1"' | ||||
mpm@selenic.com
|
r430 | cat b | ||
mpm@selenic.com
|
r1236 | |||
mpm@selenic.com
|
r407 | echo This is file b22 > b | ||
Benoit Boissinot
|
r1581 | echo %% merge fails | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge 2 | ||
mpm@selenic.com
|
r1236 | echo %% merge expected! | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge -f 2 | ||
mpm@selenic.com
|
r407 | cd ..; /bin/rm -rf t | ||
mkdir t | ||||
cd t | ||||
hg init | ||||
echo This is file a1 > a | ||||
hg add a | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #0" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b1 > b | ||
hg add b | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #1" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b22 > b | ||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #2" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | hg update 1 | ||
echo This is file c1 > c | ||||
hg add c | ||||
Thomas Arendsen Hein
|
r1933 | hg commit -m "commit #3" -d "1000000 0" | ||
mpm@selenic.com
|
r407 | echo This is file b33 > b | ||
Benoit Boissinot
|
r1581 | echo %% merge of b should fail | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge 2 | ||
Benoit Boissinot
|
r1581 | echo %% merge of b expected | ||
Vadim Gelfer
|
r2283 | env HGMERGE=../merge hg merge -f 2 | ||
mpm@selenic.com
|
r407 | cd ..; /bin/rm -rf t | ||