Patchwork D5265: revlog: use single file handle when de-inlining revlog

login
register
mail settings
Submitter phabricator
Date Nov. 14, 2018, 12:29 p.m.
Message ID <05e35a58e161099795ae53e83e2e00bc@localhost.localdomain>
Download mbox | patch
Permalink /patch/36566/
State Not Applicable
Headers show

Comments

phabricator - Nov. 14, 2018, 12:29 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG39369475445c: revlog: use single file handle when de-inlining revlog (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5265?vs=12527&id=12532

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

AFFECTED FILES
  mercurial/revlog.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1732,9 +1732,9 @@ 
             fp.flush()
             fp.close()
 
-        with self._datafp('w') as df:
+        with self._indexfp('r') as ifh, self._datafp('w') as dfh:
             for r in self:
-                df.write(self._getsegmentforrevs(r, r)[1])
+                dfh.write(self._getsegmentforrevs(r, r, df=ifh)[1])
 
         with self._indexfp('w') as fp:
             self.version &= ~FLAG_INLINE_DATA