Mercurial > hg
changeset 47411:515014d72aa2
urlutil: byteify several localized messages
Flagged by pytype.
Differential Revision: https://phab.mercurial-scm.org/D10872
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 11 Jun 2021 23:51:27 -0400 |
parents | 65333ecc8b34 |
children | c887bab2dccf |
files | mercurial/utils/urlutil.py |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/utils/urlutil.py Fri Jun 11 23:50:29 2021 -0400 +++ b/mercurial/utils/urlutil.py Fri Jun 11 23:51:27 2021 -0400 @@ -538,10 +538,12 @@ dests = list(get_push_paths(repo, ui, dests)) if len(dests) != 1: if dest is None: - msg = _("default path points to %d urls while %s only supports one") + msg = _( + b"default path points to %d urls while %s only supports one" + ) msg %= (len(dests), action) else: - msg = _("path points to %d urls while %s only supports one: %s") + msg = _(b"path points to %d urls while %s only supports one: %s") msg %= (len(dests), action, dest) raise error.Abort(msg) return dests[0] @@ -577,10 +579,12 @@ urls.append(source) if len(urls) != 1: if source is None: - msg = _("default path points to %d urls while %s only supports one") + msg = _( + b"default path points to %d urls while %s only supports one" + ) msg %= (len(urls), action) else: - msg = _("path points to %d urls while %s only supports one: %s") + msg = _(b"path points to %d urls while %s only supports one: %s") msg %= (len(urls), action, source) raise error.Abort(msg) return parseurl(urls[0], default_branches) @@ -609,11 +613,11 @@ if len(urls) != 1: if source is None: msg = _( - "default path points to %d urls while only one is supported" + b"default path points to %d urls while only one is supported" ) msg %= len(urls) else: - msg = _("path points to %d urls while only one is supported: %s") + msg = _(b"path points to %d urls while only one is supported: %s") msg %= (len(urls), source) raise error.Abort(msg) url = urls[0]