[Request] [+ ] D10872: urlutil: byteify several localized messages
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Sat Jun 12 04:57:01 UTC 2021
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
Flagged by pytype.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10872
AFFECTED FILES
mercurial/utils/urlutil.py
CHANGE DETAILS
diff --git a/mercurial/utils/urlutil.py b/mercurial/utils/urlutil.py
--- a/mercurial/utils/urlutil.py
+++ b/mercurial/utils/urlutil.py
@@ -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]
To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20210612/8c3edc57/attachment-0001.html>
More information about the Mercurial-patches
mailing list