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