##// END OF EJS Templates
filemerge: move post-merge checks into a separate function...
Siddharth Agarwal -
r26575:d6081566 default
parent child Browse files
Show More
@@ -521,7 +521,9 def filemerge(repo, mynode, orig, fcd, f
521 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf,
521 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf,
522 files, labels=labels)
522 files, labels=labels)
523
523
524 if not needcheck:
524 if needcheck:
525 r = _check(r, ui, tool, fcd, files)
526
525 if r:
527 if r:
526 if onfailure:
528 if onfailure:
527 ui.warn(onfailure % fd)
529 ui.warn(onfailure % fd)
@@ -532,6 +534,10 def filemerge(repo, mynode, orig, fcd, f
532 util.unlink(c)
534 util.unlink(c)
533 return r
535 return r
534
536
537 def _check(r, ui, tool, fcd, files):
538 fd = fcd.path()
539 a, b, c, back = files
540
535 if not r and (_toolbool(ui, tool, "checkconflicts") or
541 if not r and (_toolbool(ui, tool, "checkconflicts") or
536 'conflicts' in _toollist(ui, tool, "check")):
542 'conflicts' in _toollist(ui, tool, "check")):
537 if re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data(),
543 if re.search("^(<<<<<<< .*|=======|>>>>>>> .*)$", fcd.data(),
@@ -557,14 +563,6 def filemerge(repo, mynode, orig, fcd, f
557 if _toolbool(ui, tool, "fixeol"):
563 if _toolbool(ui, tool, "fixeol"):
558 _matcheol(a, back)
564 _matcheol(a, back)
559
565
560 if r:
561 if onfailure:
562 ui.warn(onfailure % fd)
563 else:
564 util.unlink(back)
565
566 util.unlink(b)
567 util.unlink(c)
568 return r
566 return r
569
567
570 # tell hggettext to extract docstrings from these functions:
568 # tell hggettext to extract docstrings from these functions:
General Comments 0
You need to be logged in to leave comments. Login now