D1807: filemerge: only write in-memory backup during premerge

phillco (Phil Cohen) phabricator at mercurial-scm.org
Thu Jan 18 08:01:25 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9a50ffd15b25: filemerge: only write in-memory backup during premerge (authored by phillco, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1807?vs=4700&id=4871

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -636,7 +636,8 @@
         # merging in-memory, we must redirect the backup to the memory context
         # so we don't disturb the working directory.
         relpath = back[len(repo.wvfs.base) + 1:]
-        wctx[relpath].write(fcd.data(), fcd.flags())
+        if premerge:
+            wctx[relpath].write(fcd.data(), fcd.flags())
         return wctx[relpath]
     else:
         if premerge:



To: phillco, #hg-reviewers, durham
Cc: mercurial-devel


More information about the Mercurial-devel mailing list