Patchwork D6148: store: error out if fncache does not ends with a newline

login
register
mail settings
Submitter phabricator
Date March 18, 2019, 11:35 p.m.
Message ID <748da75792c5e9ef2baf42ad2328a9fb@localhost.localdomain>
Download mbox | patch
Permalink /patch/39325/
State Not Applicable
Headers show

Comments

phabricator - March 18, 2019, 11:35 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa920a9e1795a: store: error out if fncache does not ends with a newline (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6148?vs=14543&id=14550

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

AFFECTED FILES
  mercurial/store.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: martinvonz, mjpieters, mercurial-devel

Patch

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -481,6 +481,8 @@ 
                 # chunksize, so let's keep iterating
                 pass
 
+        if chunk:
+            raise error.Abort(_("fncache does not ends with a newline"))
         self._checkentries(fp)
         fp.close()