Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/tests/test-newbranch Tue Mar 13 21:54:34 2007 -0700 +++ b/tests/test-newbranch Wed Mar 14 01:26:09 2007 -0500 @@ -13,8 +13,8 @@ hg branch bar hg ci -m "change branch name" -d "1000000 0" echo % branch shadowing -hg branch "" -hg branch -f '' +hg branch default +hg branch -f default hg ci -m "clear branch name" -d "1000000 0" hg co foo @@ -32,39 +32,14 @@ echo % test for invalid branch cache hg rollback -cp .hg/branches.cache .hg/bc-invalid +cp .hg/branch.cache .hg/bc-invalid hg log -r foo -cp .hg/bc-invalid .hg/branches.cache +cp .hg/bc-invalid .hg/branch.cache hg --debug log -r foo -rm .hg/branches.cache -echo corrupted > .hg/branches.cache +rm .hg/branch.cache +echo corrupted > .hg/branch.cache hg log -qr foo -cat .hg/branches.cache - -echo % test for different branch cache features -echo '4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4' > .hg/branches.cache -hg branches --debug -echo ' features: unnamed dummy foo bar' > .hg/branches.cache -hg branches --debug -echo ' features: dummy' > .hg/branches.cache -hg branches --debug - -echo % test old hg reading branch cache with feature list -python << EOF -import binascii -f = file('.hg/branches.cache') -lines = f.read().split('\n') -f.close() -firstline = lines[0] -last, lrev = lines.pop(0).rstrip().split(" ", 1) -try: - last, lrev = binascii.unhexlify(last), int(lrev) -except ValueError, inst: - if str(inst) == "invalid literal for int():%s" % firstline: - print "ValueError raised correctly, good." - else: - print "ValueError: %s" % inst -EOF +cat .hg/branch.cache echo % update with no arguments: tipmost revision of the current branch hg up -q -C 0