test-newbranch
65 lines
| 1.1 KiB
| text/plain
|
TextLexer
/ tests / test-newbranch
|
r3420 | #!/bin/sh | ||
hg init t | ||||
cd t | ||||
|
r3502 | hg branches | ||
|
r3420 | |||
echo foo > a | ||||
hg add a | ||||
|
r3760 | hg ci -m "initial" -d "1000000 0" | ||
|
r3502 | hg branch foo | ||
hg branch | ||||
|
r3760 | hg ci -m "add branch name" -d "1000000 0" | ||
|
r3502 | hg branch bar | ||
|
r3760 | hg ci -m "change branch name" -d "1000000 0" | ||
|
r4203 | echo % branch shadowing | ||
|
r4179 | hg branch default | ||
|
r4209 | hg branch -f default | ||
|
r3760 | hg ci -m "clear branch name" -d "1000000 0" | ||
|
r3420 | |||
hg co foo | ||||
|
r3502 | hg branch | ||
|
r3420 | echo bleah > a | ||
|
r3760 | hg ci -m "modify a branch" -d "1000000 0" | ||
|
r3420 | |||
hg merge | ||||
|
r3502 | hg branch | ||
|
r3760 | hg ci -m "merge" -d "1000000 0" | ||
|
r3420 | hg log | ||
|
r3502 | hg branches | ||
hg branches -q | ||||
|
r3451 | echo % test for invalid branch cache | ||
hg rollback | ||||
|
r4177 | cp .hg/branch.cache .hg/bc-invalid | ||
|
r3760 | hg log -r foo | ||
|
r4177 | cp .hg/bc-invalid .hg/branch.cache | ||
|
r3761 | hg --debug log -r foo | ||
|
r4177 | rm .hg/branch.cache | ||
echo corrupted > .hg/branch.cache | ||||
|
r3761 | hg log -qr foo | ||
|
r4177 | cat .hg/branch.cache | ||
|
r4175 | |||
echo % update with no arguments: tipmost revision of the current branch | ||||
hg up -q -C 0 | ||||
hg up -q | ||||
hg id | ||||
hg up -q 1 | ||||
hg up -q | ||||
hg id | ||||
|
r4231 | hg branch foobar | ||
hg up | ||||
|
r4410 | echo % fastforward merge | ||
hg branch ff | ||||
echo ff > ff | ||||
hg ci -Am'fast forward' -d '1000000 0' | ||||
hg up foo | ||||
hg merge ff | ||||
hg branch | ||||
hg commit -m'Merge ff into foo' -d '1000000 0' | ||||
hg parents | ||||
hg manifest | ||||
|
r4231 | exit 0 | ||