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

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Nov 14 07:29:38 EST 2018


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

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



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


More information about the Mercurial-devel mailing list