Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.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 | 98487ad0cf8b |
children | d4a2e0d5d042 |
line wrap: on
line diff
--- a/mercurial/ui.py Thu Mar 22 21:19:31 2018 +0900 +++ b/mercurial/ui.py Thu Mar 22 21:56:20 2018 +0900 @@ -37,7 +37,10 @@ scmutil, util, ) -from .utils import dateutil +from .utils import ( + dateutil, + stringutil, +) urlreq = util.urlreq @@ -371,7 +374,7 @@ except error.ConfigError as inst: if trusted: raise - self.warn(_("ignored: %s\n") % util.forcebytestr(inst)) + self.warn(_("ignored: %s\n") % stringutil.forcebytestr(inst)) if self.plain(): for k in ('debug', 'fallbackencoding', 'quiet', 'slash', @@ -591,7 +594,7 @@ return default if isinstance(v, bool): return v - b = util.parsebool(v) + b = stringutil.parsebool(v) if b is None: raise error.ConfigError(_("%s.%s is not a boolean ('%s')") % (section, name, v)) @@ -821,7 +824,7 @@ def shortuser(self, user): """Return a short representation of a user name or email address.""" if not self.verbose: - user = util.shortuser(user) + user = stringutil.shortuser(user) return user def expandpath(self, loc, default=None):