test-up-local-change
66 lines
| 842 B
| text/plain
|
TextLexer
/ tests / test-up-local-change
|
r544 | #!/bin/sh | ||
|
r331 | |||
|
r800 | set -e | ||
|
r331 | mkdir r1 | ||
cd r1 | ||||
hg init | ||||
echo a > a | ||||
hg addremove | ||||
|
r1933 | hg commit -m "1" -d "1000000 0" | ||
|
r331 | |||
|
r485 | hg clone . ../r2 | ||
cd ../r2 | ||||
|
r331 | hg up | ||
echo abc > a | ||||
|
r3199 | hg diff --nodates | ||
|
r331 | |||
cd ../r1 | ||||
echo b > b | ||||
echo a2 > a | ||||
hg addremove | ||||
|
r1933 | hg commit -m "2" -d "1000000 0" | ||
|
r331 | |||
cd ../r2 | ||||
hg -q pull ../r1 | ||||
hg status | ||||
|
r1674 | hg parents | ||
|
r591 | hg --debug up | ||
|
r1674 | hg parents | ||
hg --debug up 0 | ||||
hg parents | ||||
|
r2283 | hg --debug merge || echo failed | ||
|
r1674 | hg parents | ||
hg --debug up | ||||
|
r331 | hg parents | ||
hg -v history | ||||
|
r3199 | hg diff --nodates | ||
|
r331 | |||
|
r1674 | # create a second head | ||
cd ../r1 | ||||
hg up 0 | ||||
echo b2 > b | ||||
echo a3 > a | ||||
hg addremove | ||||
|
r1933 | hg commit -m "3" -d "1000000 0" | ||
|
r1674 | |||
cd ../r2 | ||||
hg -q pull ../r1 | ||||
hg status | ||||
hg parents | ||||
hg --debug up || echo failed | ||||
|
r2283 | hg --debug merge || echo failed | ||
hg --debug merge -f | ||||
|
r1674 | hg parents | ||
|
r3199 | hg diff --nodates | ||
|
r2065 | |||
# test a local add | ||||
cd .. | ||||
hg init a | ||||
hg init b | ||||
echo a > a/a | ||||
echo a > b/a | ||||
hg --cwd a commit -A -m a | ||||
cd b | ||||
hg add a | ||||
hg pull -u ../a | ||||
hg st | ||||