Mercurial > public > mercurial-scm > hg-stable
diff hgext/shelve.py @ 37087: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 | ffa3026d4196 |
children | 678d760c71ff |
line wrap: on
line diff
--- a/hgext/shelve.py Thu Mar 22 21:19:31 2018 +0900 +++ b/hgext/shelve.py Thu Mar 22 21:56:20 2018 +0900 @@ -56,7 +56,10 @@ from . import ( rebase, ) -from mercurial.utils import dateutil +from mercurial.utils import ( + dateutil, + stringutil, +) cmdtable = {} command = registrar.command(cmdtable) @@ -477,7 +480,7 @@ _shelvecreatedcommit(repo, node, name) if ui.formatted(): - desc = util.ellipsis(desc, ui.termwidth()) + desc = stringutil.ellipsis(desc, ui.termwidth()) ui.status(_('shelved as %s\n') % name) hg.update(repo, parent.node()) if origbranch != repo['.'].branch() and not _isbareshelve(pats, opts): @@ -578,7 +581,7 @@ if not line.startswith('#'): desc = line.rstrip() if ui.formatted(): - desc = util.ellipsis(desc, width - used) + desc = stringutil.ellipsis(desc, width - used) ui.write(desc) break ui.write('\n')