equal
deleted
inserted
replaced
27 simplemerge, |
27 simplemerge, |
28 tagmerge, |
28 tagmerge, |
29 templatekw, |
29 templatekw, |
30 templater, |
30 templater, |
31 util, |
31 util, |
|
32 ) |
|
33 |
|
34 from .utils import ( |
|
35 stringutil, |
32 ) |
36 ) |
33 |
37 |
34 def _toolstr(ui, tool, part, *args): |
38 def _toolstr(ui, tool, part, *args): |
35 return ui.config("merge-tools", tool + "." + part, *args) |
39 return ui.config("merge-tools", tool + "." + part, *args) |
36 |
40 |
571 |
575 |
572 if mark: |
576 if mark: |
573 mark = mark.splitlines()[0] # split for safety |
577 mark = mark.splitlines()[0] # split for safety |
574 |
578 |
575 # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') |
579 # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ') |
576 return util.ellipsis(mark, 80 - 8) |
580 return stringutil.ellipsis(mark, 80 - 8) |
577 |
581 |
578 _defaultconflictlabels = ['local', 'other'] |
582 _defaultconflictlabels = ['local', 'other'] |
579 |
583 |
580 def _formatlabels(repo, fcd, fco, fca, labels, tool=None): |
584 def _formatlabels(repo, fcd, fco, fca, labels, tool=None): |
581 """Formats the given labels using the conflict marker template. |
585 """Formats the given labels using the conflict marker template. |