Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 46714:6f4a481f182a
merge: with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 12 Mar 2021 13:13:13 -0500 |
parents | b4c2a2af25e2 d5d9177c0045 |
children | fd55a9eb1507 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Mar 10 18:24:23 2021 +0100 +++ b/mercurial/localrepo.py Fri Mar 12 13:13:13 2021 -0500 @@ -543,7 +543,7 @@ except ValueError as e: # Can be raised on Python 3.8 when path is invalid. raise error.Abort( - _(b'invalid path %s: %s') % (path, pycompat.bytestr(e)) + _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e)) ) raise error.RepoError(_(b'repository %s not found') % path) @@ -571,7 +571,7 @@ # repository was shared the old way. We check the share source .hg/requires # for SHARESAFE_REQUIREMENT to detect whether the current repository needs # to be reshared - hint = _("see `hg help config.format.use-share-safe` for more information") + hint = _(b"see `hg help config.format.use-share-safe` for more information") if requirementsmod.SHARESAFE_REQUIREMENT in requirements: if ( @@ -1137,7 +1137,7 @@ """File storage when using revlogs.""" def file(self, path): - if path[0] == b'/': + if path.startswith(b'/'): path = path[1:] return filelog.filelog(self.svfs, path) @@ -1148,7 +1148,7 @@ """File storage when using revlogs and narrow files.""" def file(self, path): - if path[0] == b'/': + if path.startswith(b'/'): path = path[1:] return filelog.narrowfilelog(self.svfs, path, self._storenarrowmatch)