changeset 41600:a8ccd821b7d2

filemerge: migrate to scmutil.backuppath() Differential Revision: https://phab.mercurial-scm.org/D5856
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 04 Feb 2019 21:14:37 -0800
parents 106b0bec162a
children ac8cf125d8d5
files mercurial/filemerge.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Mon Feb 04 21:10:17 2019 -0800
+++ b/mercurial/filemerge.py	Mon Feb 04 21:14:37 2019 -0800
@@ -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.