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