##// END OF EJS Templates
filemerge: remove `uselocalpath` argument from `_maketempfiles()`...
Martin von Zweigbergk -
r49633:9d0d0a38 default
parent child Browse files
Show More
@@ -743,9 +743,14 b' def _xmerge(repo, mynode, local, other, '
743 return False, 1, None
743 return False, 1, None
744 localpath = _workingpath(repo, fcd)
744 localpath = _workingpath(repo, fcd)
745 args = _toolstr(repo.ui, tool, b"args")
745 args = _toolstr(repo.ui, tool, b"args")
746 localoutputpath = None
747 if b"$output" in args:
748 localoutputpath = backup.path()
746
749
747 with _maketempfiles(
750 with _maketempfiles(
748 fco, fca, backup.path(), b"$output" in args
751 fco,
752 fca,
753 localoutputpath,
749 ) as temppaths:
754 ) as temppaths:
750 basepath, otherpath, localoutputpath = temppaths
755 basepath, otherpath, localoutputpath = temppaths
751 outpath = b""
756 outpath = b""
@@ -908,10 +913,10 b' def _makebackup(repo, ui, fcd):'
908
913
909
914
910 @contextlib.contextmanager
915 @contextlib.contextmanager
911 def _maketempfiles(fco, fca, localpath, uselocalpath):
916 def _maketempfiles(fco, fca, localpath):
912 """Writes out `fco` and `fca` as temporary files, and (if uselocalpath)
917 """Writes out `fco` and `fca` as temporary files, and (if localpath is not
913 copies `localpath` to another temporary file, so an external merge tool may
918 None) copies `localpath` to another temporary file, so an external merge
914 use them.
919 tool may use them.
915 """
920 """
916 tmproot = pycompat.mkdtemp(prefix=b'hgmerge-')
921 tmproot = pycompat.mkdtemp(prefix=b'hgmerge-')
917
922
@@ -934,7 +939,7 b' def _maketempfiles(fco, fca, localpath, '
934 b = tempfromcontext(b"base", fca)
939 b = tempfromcontext(b"base", fca)
935 c = tempfromcontext(b"other", fco)
940 c = tempfromcontext(b"other", fco)
936 d = localpath
941 d = localpath
937 if uselocalpath:
942 if localpath is not None:
938 # We start off with this being the backup filename, so remove the .orig
943 # We start off with this being the backup filename, so remove the .orig
939 # to make syntax-highlighting more likely.
944 # to make syntax-highlighting more likely.
940 if d.endswith(b'.orig'):
945 if d.endswith(b'.orig'):
General Comments 0
You need to be logged in to leave comments. Login now