diff tests/test-branches.t @ 23862:7aa1405528a3

branchcache: add debug output whenever cache files use truncate The cache files are usually append only but will automatically be truncated and recover in exceptional situations. Add a debug notice when such exceptional situations are encountered.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 14 Jan 2015 01:15:26 +0100
parents 01426cad66dc
children 577f65cf1a57
line wrap: on
line diff
--- a/tests/test-branches.t	Wed Jan 14 01:15:26 2015 +0100
+++ b/tests/test-branches.t	Wed Jan 14 01:15:26 2015 +0100
@@ -550,6 +550,7 @@
 recovery from invalid cache revs file with trailing data
   $ echo >> .hg/cache/rbc-revs-v1
   $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
+  truncating cache/rbc-revs-v1 to 120
   5
   $ f --size .hg/cache/rbc-revs*
   .hg/cache/rbc-revs-v1: size=120
@@ -559,6 +560,7 @@
   $ f --size .hg/cache/rbc-revs*
   .hg/cache/rbc-revs-v1: size=119
   $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
+  truncating cache/rbc-revs-v1 to 112
   5
   $ f --size .hg/cache/rbc-revs*
   .hg/cache/rbc-revs-v1: size=120
@@ -580,6 +582,7 @@
   $ hg log -r 'branch(.)' -T '{rev} '
   3 4 8 9 10 11 12 13  (no-eol)
   $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
+  truncating cache/rbc-revs-v1 to 8
   5
   $ f --size --hexdump --bytes=16 .hg/cache/rbc-revs*
   .hg/cache/rbc-revs-v1: size=120