test-newbranch
65 lines
| 1.1 KiB
| text/plain
|
TextLexer
/ tests / test-newbranch
Matt Mackall
|
r3420 | #!/bin/sh | ||
hg init t | ||||
cd t | ||||
Matt Mackall
|
r3502 | hg branches | ||
Matt Mackall
|
r3420 | |||
echo foo > a | ||||
hg add a | ||||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "initial" -d "1000000 0" | ||
Matt Mackall
|
r3502 | hg branch foo | ||
hg branch | ||||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "add branch name" -d "1000000 0" | ||
Matt Mackall
|
r3502 | hg branch bar | ||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "change branch name" -d "1000000 0" | ||
Brendan Cully
|
r4203 | echo % branch shadowing | ||
Matt Mackall
|
r4179 | hg branch default | ||
Matt Mackall
|
r4209 | hg branch -f default | ||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "clear branch name" -d "1000000 0" | ||
Matt Mackall
|
r3420 | |||
hg co foo | ||||
Matt Mackall
|
r3502 | hg branch | ||
Matt Mackall
|
r3420 | echo bleah > a | ||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "modify a branch" -d "1000000 0" | ||
Matt Mackall
|
r3420 | |||
hg merge | ||||
Matt Mackall
|
r3502 | hg branch | ||
Alexis S. L. Carvalho
|
r3760 | hg ci -m "merge" -d "1000000 0" | ||
Matt Mackall
|
r3420 | hg log | ||
Matt Mackall
|
r3502 | hg branches | ||
hg branches -q | ||||
Thomas Arendsen Hein
|
r3451 | echo % test for invalid branch cache | ||
hg rollback | ||||
Matt Mackall
|
r4177 | cp .hg/branch.cache .hg/bc-invalid | ||
Alexis S. L. Carvalho
|
r3760 | hg log -r foo | ||
Matt Mackall
|
r4177 | cp .hg/bc-invalid .hg/branch.cache | ||
Alexis S. L. Carvalho
|
r3761 | hg --debug log -r foo | ||
Matt Mackall
|
r4177 | rm .hg/branch.cache | ||
echo corrupted > .hg/branch.cache | ||||
Alexis S. L. Carvalho
|
r3761 | hg log -qr foo | ||
Matt Mackall
|
r4177 | cat .hg/branch.cache | ||
Brendan Cully
|
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 | ||||
Alexis S. L. Carvalho
|
r4231 | hg branch foobar | ||
hg up | ||||
Brendan Cully
|
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 | ||||
Alexis S. L. Carvalho
|
r4231 | exit 0 | ||