Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-newbranch @ 4209:dbc3846c09a1
Merge with -stable, fix small test failure
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 14 Mar 2007 01:26:09 -0500 |
parents | aee3d312c32e 7e1c8a565a4f |
children | 0d51eb296fb9 |
comparison
equal
deleted
inserted
replaced
4203:bd9b84b9a84b | 4209:dbc3846c09a1 |
---|---|
11 hg branch | 11 hg branch |
12 hg ci -m "add branch name" -d "1000000 0" | 12 hg ci -m "add branch name" -d "1000000 0" |
13 hg branch bar | 13 hg branch bar |
14 hg ci -m "change branch name" -d "1000000 0" | 14 hg ci -m "change branch name" -d "1000000 0" |
15 echo % branch shadowing | 15 echo % branch shadowing |
16 hg branch "" | 16 hg branch default |
17 hg branch -f '' | 17 hg branch -f default |
18 hg ci -m "clear branch name" -d "1000000 0" | 18 hg ci -m "clear branch name" -d "1000000 0" |
19 | 19 |
20 hg co foo | 20 hg co foo |
21 hg branch | 21 hg branch |
22 echo bleah > a | 22 echo bleah > a |
30 hg branches | 30 hg branches |
31 hg branches -q | 31 hg branches -q |
32 | 32 |
33 echo % test for invalid branch cache | 33 echo % test for invalid branch cache |
34 hg rollback | 34 hg rollback |
35 cp .hg/branches.cache .hg/bc-invalid | 35 cp .hg/branch.cache .hg/bc-invalid |
36 hg log -r foo | 36 hg log -r foo |
37 cp .hg/bc-invalid .hg/branches.cache | 37 cp .hg/bc-invalid .hg/branch.cache |
38 hg --debug log -r foo | 38 hg --debug log -r foo |
39 rm .hg/branches.cache | 39 rm .hg/branch.cache |
40 echo corrupted > .hg/branches.cache | 40 echo corrupted > .hg/branch.cache |
41 hg log -qr foo | 41 hg log -qr foo |
42 cat .hg/branches.cache | 42 cat .hg/branch.cache |
43 | |
44 echo % test for different branch cache features | |
45 echo '4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4' > .hg/branches.cache | |
46 hg branches --debug | |
47 echo ' features: unnamed dummy foo bar' > .hg/branches.cache | |
48 hg branches --debug | |
49 echo ' features: dummy' > .hg/branches.cache | |
50 hg branches --debug | |
51 | |
52 echo % test old hg reading branch cache with feature list | |
53 python << EOF | |
54 import binascii | |
55 f = file('.hg/branches.cache') | |
56 lines = f.read().split('\n') | |
57 f.close() | |
58 firstline = lines[0] | |
59 last, lrev = lines.pop(0).rstrip().split(" ", 1) | |
60 try: | |
61 last, lrev = binascii.unhexlify(last), int(lrev) | |
62 except ValueError, inst: | |
63 if str(inst) == "invalid literal for int():%s" % firstline: | |
64 print "ValueError raised correctly, good." | |
65 else: | |
66 print "ValueError: %s" % inst | |
67 EOF | |
68 | 43 |
69 echo % update with no arguments: tipmost revision of the current branch | 44 echo % update with no arguments: tipmost revision of the current branch |
70 hg up -q -C 0 | 45 hg up -q -C 0 |
71 hg up -q | 46 hg up -q |
72 hg id | 47 hg id |