From patchwork Fri Jan 5 05:35:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1807: filemerge: only write in-memory backup during premerge From: phabricator X-Patchwork-Id: 26554 Message-Id: <603e8d2c939bf32fb6453aaec4a53bb3@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Fri, 5 Jan 2018 05:35:46 +0000 phillco updated this revision to Diff 4698. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1807?vs=4689&id=4698 REVISION DETAIL https://phab.mercurial-scm.org/D1807 AFFECTED FILES mercurial/filemerge.py CHANGE DETAILS To: phillco, #hg-reviewers, durham Cc: mercurial-devel 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: