##// END OF EJS Templates
filemerge: give some variables in _xmerge more descriptive names...
Kyle Lippincott -
r36994:a4a95bd7 default
parent child Browse files
Show More
@@ -509,10 +509,10 def _xmerge(repo, mynode, orig, fcd, fco
509 'for %s\n') % (tool, fcd.path()))
509 'for %s\n') % (tool, fcd.path()))
510 return False, 1, None
510 return False, 1, None
511 unused, unused, unused, back = files
511 unused, unused, unused, back = files
512 a = _workingpath(repo, fcd)
512 localpath = _workingpath(repo, fcd)
513 b, c = _maketempfiles(repo, fco, fca)
513 basepath, otherpath = _maketempfiles(repo, fco, fca)
514 try:
514 try:
515 out = ""
515 outpath = ""
516 mylabel, otherlabel = labels[:2]
516 mylabel, otherlabel = labels[:2]
517 if len(labels) >= 3:
517 if len(labels) >= 3:
518 baselabel = labels[2]
518 baselabel = labels[2]
@@ -534,11 +534,11 def _xmerge(repo, mynode, orig, fcd, fco
534 args = _toolstr(ui, tool, "args")
534 args = _toolstr(ui, tool, "args")
535 if "$output" in args:
535 if "$output" in args:
536 # read input from backup, write to original
536 # read input from backup, write to original
537 out = a
537 outpath = localpath
538 a = repo.wvfs.join(back.path())
538 localpath = repo.wvfs.join(back.path())
539 replace = {'local': a, 'base': b, 'other': c, 'output': out,
539 replace = {'local': localpath, 'base': basepath, 'other': otherpath,
540 'labellocal': mylabel, 'labelother': otherlabel,
540 'output': outpath, 'labellocal': mylabel,
541 'labelbase': baselabel}
541 'labelother': otherlabel, 'labelbase': baselabel}
542 args = util.interpolate(br'\$', replace, args,
542 args = util.interpolate(br'\$', replace, args,
543 lambda s: util.shellquote(util.localpath(s)))
543 lambda s: util.shellquote(util.localpath(s)))
544 cmd = toolpath + ' ' + args
544 cmd = toolpath + ' ' + args
@@ -550,8 +550,8 def _xmerge(repo, mynode, orig, fcd, fco
550 repo.ui.debug('merge tool returned: %d\n' % r)
550 repo.ui.debug('merge tool returned: %d\n' % r)
551 return True, r, False
551 return True, r, False
552 finally:
552 finally:
553 util.unlink(b)
553 util.unlink(basepath)
554 util.unlink(c)
554 util.unlink(otherpath)
555
555
556 def _formatconflictmarker(ctx, template, label, pad):
556 def _formatconflictmarker(ctx, template, label, pad):
557 """Applies the given template to the ctx, prefixed by the label.
557 """Applies the given template to the ctx, prefixed by the label.
General Comments 0
You need to be logged in to leave comments. Login now