##// END OF EJS Templates
filemerge: move precheck to before files are written out...
Siddharth Agarwal -
r26529:7833b13b default
parent child Browse files
Show More
@@ -500,6 +500,12 b' def filemerge(repo, mynode, orig, fcd, f'
500
500
501 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
501 ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
502
502
503 if precheck and not precheck(repo, mynode, orig, fcd, fco, fca,
504 toolconf):
505 if onfailure:
506 ui.warn(onfailure % fd)
507 return 1
508
503 a = repo.wjoin(fd)
509 a = repo.wjoin(fd)
504 b = temp("base", fca)
510 b = temp("base", fca)
505 c = temp("other", fco)
511 c = temp("other", fco)
@@ -507,21 +513,14 b' def filemerge(repo, mynode, orig, fcd, f'
507 util.copyfile(a, back)
513 util.copyfile(a, back)
508 files = (a, b, c, back)
514 files = (a, b, c, back)
509
515
510 r = 0
516 markerstyle = ui.config('ui', 'mergemarkers', 'basic')
511 if precheck and not precheck(repo, mynode, orig, fcd, fco, fca,
517 if not labels:
512 toolconf):
518 labels = _defaultconflictlabels
513 r = 1
519 if markerstyle != 'basic':
514 needcheck = False
520 labels = _formatlabels(repo, fcd, fco, fca, labels)
515
521
516 if not r: # precheck passed
522 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf, files,
517 markerstyle = ui.config('ui', 'mergemarkers', 'basic')
523 labels=labels)
518 if not labels:
519 labels = _defaultconflictlabels
520 if markerstyle != 'basic':
521 labels = _formatlabels(repo, fcd, fco, fca, labels)
522
523 needcheck, r = func(repo, mynode, orig, fcd, fco, fca, toolconf,
524 files, labels=labels)
525
524
526 if not needcheck:
525 if not needcheck:
527 if r:
526 if r:
General Comments 0
You need to be logged in to leave comments. Login now