From patchwork Thu Feb 7 02:03:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D5856: filemerge: migrate to scmutil.backuppath() From: phabricator X-Patchwork-Id: 38506 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 7 Feb 2019 02:03:50 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG2eed54dcf6d4: filemerge: migrate to scmutil.backuppath() (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5856?vs=13861&id=13878 REVISION DETAIL https://phab.mercurial-scm.org/D5856 AFFECTED FILES mercurial/filemerge.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-devel diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -743,8 +743,7 @@ # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset -> # merge -> filemerge). (I suspect the fileset import is the weakest link) from . import context - a = _workingpath(repo, fcd) - back = scmutil.origpath(ui, repo, a) + back = scmutil.backuppath(ui, repo, fcd.path()) inworkingdir = (back.startswith(repo.wvfs.base) and not back.startswith(repo.vfs.base)) if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: @@ -764,6 +763,7 @@ if isinstance(fcd, context.overlayworkingfilectx): util.writefile(back, fcd.data()) else: + a = _workingpath(repo, fcd) util.copyfile(a, back) # A arbitraryfilectx is returned, so we can run the same functions on # the backup context regardless of where it lives.