Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.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 | 317382151ac3 |
children | 08890706366e |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/cmdutil.py Thu Mar 22 21:56:20 2018 +0900 @@ -48,7 +48,12 @@ util, vfs as vfsmod, ) -from .utils import dateutil + +from .utils import ( + dateutil, + stringutil, +) + stringio = util.stringio # templates of common command options @@ -962,9 +967,9 @@ while i < end: n = pat.find(b'%', i, end) if n < 0: - newname.append(util.escapestr(pat[i:end])) + newname.append(stringutil.escapestr(pat[i:end])) break - newname.append(util.escapestr(pat[i:n])) + newname.append(stringutil.escapestr(pat[i:n])) if n + 2 > end: raise error.Abort(_("incomplete format spec in output " "filename")) @@ -1479,7 +1484,7 @@ patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix, files, eolmode=None) except error.PatchError as e: - raise error.Abort(util.forcebytestr(e)) + raise error.Abort(stringutil.forcebytestr(e)) if opts.get('exact'): editor = None else: