comparison mercurial/filemerge.py @ 29660:99b50346b750

merge: concatenate default conflict marker at parsing phase of .py "+" operations are unnecessary.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 05 May 2015 10:51:34 +0900
parents 78759f78a44e
children a7f8939641aa
comparison
equal deleted inserted replaced
29659:7eb9ee3e6b14 29660:99b50346b750
506 mark = mark.splitlines()[0] # split for safety 506 mark = mark.splitlines()[0] # split for safety
507 507
508 # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') 508 # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ')
509 return util.ellipsis(mark, 80 - 8) 509 return util.ellipsis(mark, 80 - 8)
510 510
511 _defaultconflictmarker = ('{node|short} ' + 511 _defaultconflictmarker = ('{node|short} '
512 '{ifeq(tags, "tip", "", "{tags} ")}' + 512 '{ifeq(tags, "tip", "", "{tags} ")}'
513 '{if(bookmarks, "{bookmarks} ")}' + 513 '{if(bookmarks, "{bookmarks} ")}'
514 '{ifeq(branch, "default", "", "{branch} ")}' + 514 '{ifeq(branch, "default", "", "{branch} ")}'
515 '- {author|user}: {desc|firstline}') 515 '- {author|user}: {desc|firstline}')
516 516
517 _defaultconflictlabels = ['local', 'other'] 517 _defaultconflictlabels = ['local', 'other']
518 518
519 def _formatlabels(repo, fcd, fco, fca, labels): 519 def _formatlabels(repo, fcd, fco, fca, labels):
520 """Formats the given labels using the conflict marker template. 520 """Formats the given labels using the conflict marker template.