diff mercurial/utils/urlutil.py @ 46928:93c224dc099b

urlutil: use bytes for Abort messages Caught by pytype. Also fix a minor grammar issue in the second message. Differential Revision: https://phab.mercurial-scm.org/D10433
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 14 Apr 2021 22:50:41 -0400
parents efadec3ea8e2
children ebb13f9a9ba8
line wrap: on
line diff
--- a/mercurial/utils/urlutil.py	Thu Apr 08 16:41:13 2021 +0200
+++ b/mercurial/utils/urlutil.py	Wed Apr 14 22:50:41 2021 -0400
@@ -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