Show More
@@ -470,8 +470,7 b' def _idump(repo, mynode, orig, fcd, fco,' | |||
|
470 | 470 | This implies permerge. Therefore, files aren't dumped, if premerge |
|
471 | 471 | runs successfully. Use :forcedump to forcibly write files out. |
|
472 | 472 | """ |
|
473 | a, unused, unused, unused = files | |
|
474 | ||
|
473 | a = _workingpath(repo, fcd) | |
|
475 | 474 | fd = fcd.path() |
|
476 | 475 | |
|
477 | 476 | util.copyfile(a, a + ".local") |
@@ -494,7 +493,8 b' def _xmerge(repo, mynode, orig, fcd, fco' | |||
|
494 | 493 | repo.ui.warn(_('warning: %s cannot merge change/delete conflict ' |
|
495 | 494 | 'for %s\n') % (tool, fcd.path())) |
|
496 | 495 | return False, 1, None |
|
497 |
|
|
|
496 | unused, b, c, back = files | |
|
497 | a = _workingpath(repo, fcd) | |
|
498 | 498 | out = "" |
|
499 | 499 | env = {'HG_FILE': fcd.path(), |
|
500 | 500 | 'HG_MY_NODE': short(mynode), |
@@ -597,7 +597,7 b' def _makebackup(repo, ui, fcd, premerge)' | |||
|
597 | 597 | if fcd.isabsent(): |
|
598 | 598 | return None |
|
599 | 599 | |
|
600 | a = repo.wjoin(fcd.path()) | |
|
600 | a = _workingpath(repo, fcd) | |
|
601 | 601 | back = scmutil.origpath(ui, repo, a) |
|
602 | 602 | if premerge: |
|
603 | 603 | util.copyfile(a, back) |
@@ -705,7 +705,7 b' def _filemerge(premerge, repo, mynode, o' | |||
|
705 | 705 | toolconf, files, labels=labels) |
|
706 | 706 | |
|
707 | 707 | if needcheck: |
|
708 | r = _check(r, ui, tool, fcd, files) | |
|
708 | r = _check(repo, r, ui, tool, fcd, files) | |
|
709 | 709 | |
|
710 | 710 | if r: |
|
711 | 711 | if onfailure: |
@@ -718,9 +718,9 b' def _filemerge(premerge, repo, mynode, o' | |||
|
718 | 718 | util.unlink(files[1]) |
|
719 | 719 | util.unlink(files[2]) |
|
720 | 720 | |
|
721 | def _check(r, ui, tool, fcd, files): | |
|
721 | def _check(repo, r, ui, tool, fcd, files): | |
|
722 | 722 | fd = fcd.path() |
|
723 |
|
|
|
723 | unused, unused, unused, back = files | |
|
724 | 724 | |
|
725 | 725 | if not r and (_toolbool(ui, tool, "checkconflicts") or |
|
726 | 726 | 'conflicts' in _toollist(ui, tool, "check")): |
@@ -738,17 +738,20 b' def _check(r, ui, tool, fcd, files):' | |||
|
738 | 738 | if not r and not checked and (_toolbool(ui, tool, "checkchanged") or |
|
739 | 739 | 'changed' in |
|
740 | 740 | _toollist(ui, tool, "check")): |
|
741 | if back is not None and filecmp.cmp(a, back): | |
|
741 | if back is not None and filecmp.cmp(_workingpath(repo, fcd), back): | |
|
742 | 742 | if ui.promptchoice(_(" output file %s appears unchanged\n" |
|
743 | 743 | "was merge successful (yn)?" |
|
744 | 744 | "$$ &Yes $$ &No") % fd, 1): |
|
745 | 745 | r = 1 |
|
746 | 746 | |
|
747 | 747 | if back is not None and _toolbool(ui, tool, "fixeol"): |
|
748 | _matcheol(a, back) | |
|
748 | _matcheol(_workingpath(repo, fcd), back) | |
|
749 | 749 | |
|
750 | 750 | return r |
|
751 | 751 | |
|
752 | def _workingpath(repo, ctx): | |
|
753 | return repo.wjoin(ctx.path()) | |
|
754 | ||
|
752 | 755 | def premerge(repo, mynode, orig, fcd, fco, fca, labels=None): |
|
753 | 756 | return _filemerge(True, repo, mynode, orig, fcd, fco, fca, labels=labels) |
|
754 | 757 |
General Comments 0
You need to be logged in to leave comments.
Login now