diff -r 0492002560f3 -r 9842c00f0252 mercurial/localrepo.py --- a/mercurial/localrepo.py Thu Feb 25 15:18:00 2021 +0530 +++ b/mercurial/localrepo.py Tue Feb 02 20:20:17 2021 +0900 @@ -1135,7 +1135,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) @@ -1146,7 +1146,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)