[Request] [+ ] D10433: urlutil: use bytes for Abort messages

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Thu Apr 15 02:51:07 UTC 2021


mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Caught by pytype.  Also fix a minor grammar issue in the second message.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10433

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
@@ -643,11 +643,11 @@
             try:
                 subpath = paths[self.url.host]
             except KeyError:
-                m = _('cannot use `%s`, "%s" is not a known path')
+                m = _(b'cannot use `%s`, "%s" is not a known path')
                 m %= (self.rawloc, self.url.host)
                 raise error.Abort(m)
             if subpath.raw_url.scheme == b'path':
-                m = _('cannot use `%s`, "%s" is also define as a `path://`')
+                m = _(b'cannot use `%s`, "%s" is also defined as a `path://`')
                 m %= (self.rawloc, self.url.host)
                 raise error.Abort(m)
             self.url = subpath.url



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/20210415/d2a6be23/attachment.html>


More information about the Mercurial-patches mailing list