Patchwork D6721: fncache: show that debugrebuildfncache is partly broken

login
register
mail settings
Submitter phabricator
Date Aug. 12, 2019, 6:13 p.m.
Message ID <differential-rev-PHID-DREV-35pdkdg47gva24fi55qv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41249/
State Superseded
Headers show

Comments

phabricator - Aug. 12, 2019, 6:13 p.m.
valentin.gatienbaron created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D6721

AFFECTED FILES
  tests/test-fncache.t

CHANGE DETAILS




To: valentin.gatienbaron, #hg-reviewers
Cc: mjpieters, mercurial-devel

Patch

diff --git a/tests/test-fncache.t b/tests/test-fncache.t
--- a/tests/test-fncache.t
+++ b/tests/test-fncache.t
@@ -435,6 +435,17 @@ 
   data/.bar.i
   data/foo.i
 
+debugrebuildfncache fails to recover from truncated line in fncache
+
+  $ printf a > .hg/store/fncache
+  $ hg debugrebuildfncache
+  abort: fncache does not ends with a newline
+  (use 'hg debugrebuildfncache' to rebuild the fncache)
+  [255]
+
+  $ cat .hg/store/fncache | sort
+  a
+
   $ cd ..
 
 Try a simple variation without dotencode to ensure fncache is ignorant of encoding