Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 37084:f0b6fbea00cf
stringutil: bulk-replace call sites to point to new module
This might conflict with other patches floating around, sorry.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 22 Mar 2018 21:56:20 +0900 |
parents | 1e30a26a65d0 |
children | a8a902d7176e |
comparison
equal
deleted
inserted
replaced
37083:f99d64e8a4e4 | 37084:f0b6fbea00cf |
---|---|
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. |