Show More
@@ -521,41 +521,8 b' def filemerge(repo, mynode, orig, fcd, f' | |||
|
521 | 521 | needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, |
|
522 | 522 | files, labels=labels) |
|
523 | 523 | |
|
524 |
if |
|
|
525 | if r: | |
|
526 | if onfailure: | |
|
527 | ui.warn(onfailure % fd) | |
|
528 | else: | |
|
529 | util.unlink(back) | |
|
530 | ||
|
531 | util.unlink(b) | |
|
532 | util.unlink(c) | |
|
533 | return r | |
|
534 | ||
|
535 | if not r and (_toolbool(ui, tool, "checkconflicts") or | |
|
536 | 'conflicts' in _toollist(ui, tool, "check")): | |
|
537 | if re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data(), | |
|
538 | re.MULTILINE): | |
|
539 | r = 1 | |
|
540 | ||
|
541 | checked = False | |
|
542 | if 'prompt' in _toollist(ui, tool, "check"): | |
|
543 | checked = True | |
|
544 | if ui.promptchoice(_("was merge of '%s' successful (yn)?" | |
|
545 | "$$ &Yes $$ &No") % fd, 1): | |
|
546 | r = 1 | |
|
547 | ||
|
548 | if not r and not checked and (_toolbool(ui, tool, "checkchanged") or | |
|
549 | 'changed' in | |
|
550 | _toollist(ui, tool, "check")): | |
|
551 | if filecmp.cmp(a, back): | |
|
552 | if ui.promptchoice(_(" output file %s appears unchanged\n" | |
|
553 | "was merge successful (yn)?" | |
|
554 | "$$ &Yes $$ &No") % fd, 1): | |
|
555 | r = 1 | |
|
556 | ||
|
557 | if _toolbool(ui, tool, "fixeol"): | |
|
558 | _matcheol(a, back) | |
|
524 | if needcheck: | |
|
525 | r = _check(r, ui, tool, fcd, files) | |
|
559 | 526 | |
|
560 | 527 | if r: |
|
561 | 528 | if onfailure: |
@@ -567,5 +534,36 b' def filemerge(repo, mynode, orig, fcd, f' | |||
|
567 | 534 | util.unlink(c) |
|
568 | 535 | return r |
|
569 | 536 | |
|
537 | def _check(r, ui, tool, fcd, files): | |
|
538 | fd = fcd.path() | |
|
539 | a, b, c, back = files | |
|
540 | ||
|
541 | if not r and (_toolbool(ui, tool, "checkconflicts") or | |
|
542 | 'conflicts' in _toollist(ui, tool, "check")): | |
|
543 | if re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data(), | |
|
544 | re.MULTILINE): | |
|
545 | r = 1 | |
|
546 | ||
|
547 | checked = False | |
|
548 | if 'prompt' in _toollist(ui, tool, "check"): | |
|
549 | checked = True | |
|
550 | if ui.promptchoice(_("was merge of '%s' successful (yn)?" | |
|
551 | "$$ &Yes $$ &No") % fd, 1): | |
|
552 | r = 1 | |
|
553 | ||
|
554 | if not r and not checked and (_toolbool(ui, tool, "checkchanged") or | |
|
555 | 'changed' in | |
|
556 | _toollist(ui, tool, "check")): | |
|
557 | if filecmp.cmp(a, back): | |
|
558 | if ui.promptchoice(_(" output file %s appears unchanged\n" | |
|
559 | "was merge successful (yn)?" | |
|
560 | "$$ &Yes $$ &No") % fd, 1): | |
|
561 | r = 1 | |
|
562 | ||
|
563 | if _toolbool(ui, tool, "fixeol"): | |
|
564 | _matcheol(a, back) | |
|
565 | ||
|
566 | return r | |
|
567 | ||
|
570 | 568 | # tell hggettext to extract docstrings from these functions: |
|
571 | 569 | i18nfunctions = internals.values() |
General Comments 0
You need to be logged in to leave comments.
Login now