##// END OF EJS Templates
filemerge: migrate to scmutil.backuppath()...
Martin von Zweigbergk -
r41740:2eed54dc default draft
parent child Browse files
Show More
@@ -743,8 +743,7 b' def _makebackup(repo, ui, wctx, fcd, pre'
743 # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset ->
743 # TODO: Break this import cycle somehow. (filectx -> ctx -> fileset ->
744 # merge -> filemerge). (I suspect the fileset import is the weakest link)
744 # merge -> filemerge). (I suspect the fileset import is the weakest link)
745 from . import context
745 from . import context
746 a = _workingpath(repo, fcd)
746 back = scmutil.backuppath(ui, repo, fcd.path())
747 back = scmutil.origpath(ui, repo, a)
748 inworkingdir = (back.startswith(repo.wvfs.base) and not
747 inworkingdir = (back.startswith(repo.wvfs.base) and not
749 back.startswith(repo.vfs.base))
748 back.startswith(repo.vfs.base))
750 if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir:
749 if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir:
@@ -764,6 +763,7 b' def _makebackup(repo, ui, wctx, fcd, pre'
764 if isinstance(fcd, context.overlayworkingfilectx):
763 if isinstance(fcd, context.overlayworkingfilectx):
765 util.writefile(back, fcd.data())
764 util.writefile(back, fcd.data())
766 else:
765 else:
766 a = _workingpath(repo, fcd)
767 util.copyfile(a, back)
767 util.copyfile(a, back)
768 # A arbitraryfilectx is returned, so we can run the same functions on
768 # A arbitraryfilectx is returned, so we can run the same functions on
769 # the backup context regardless of where it lives.
769 # the backup context regardless of where it lives.
General Comments 0
You need to be logged in to leave comments. Login now