--- a/tests/test-newbranch.t Mon Jan 07 17:16:24 2013 +0100
+++ b/tests/test-newbranch.t Mon Jan 07 17:23:25 2013 +0100
@@ -1,5 +1,15 @@
$ branchcache=.hg/cache/branchheads
+ $ listbranchcaches() {
+ > for f in .hg/cache/branchheads*;
+ > do echo === $f ===;
+ > cat $f;
+ > done;
+ > }
+ $ purgebranchcaches() {
+ > rm .hg/cache/branchheads*
+ > }
+
$ hg init t
$ cd t
@@ -112,7 +122,7 @@
repository tip rolled back to revision 4 (undo commit)
working directory now based on revisions 4 and 3
- $ cp $branchcache .hg/bc-invalid
+ $ cp ${branchcache}-unserved .hg/bc-invalid
$ hg log -r foo
changeset: 4:adf1a74a7f7b
@@ -142,13 +152,16 @@
modify a branch
- $ rm $branchcache
+ $ purgebranchcaches
$ echo corrupted > $branchcache
$ hg log -qr foo
4:adf1a74a7f7b
- $ cat $branchcache
+ $ listbranchcaches
+ === .hg/cache/branchheads ===
+ corrupted
+ === .hg/cache/branchheads-unserved ===
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo
@@ -162,7 +175,8 @@
$ hg push -qr 0 ../target
- $ cat ../target/$branchcache
+ $ (cd ../target/; listbranchcaches)
+ === .hg/cache/branchheads-unserved ===
db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 0
db01e8ea3388fd3c7c94e1436ea2bd6a53d581c5 default
@@ -170,7 +184,8 @@
$ hg push -qf ../target
- $ cat ../target/$branchcache
+ $ (cd ../target/; listbranchcaches)
+ === .hg/cache/branchheads-unserved ===
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 4
1c28f494dae69a2f8fc815059d257eccf3fcfe75 default
adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6 foo