mercurial/localrepo.py
branchstable
changeset 46549 9842c00f0252
parent 46351 085294a8c0e0
child 46571 25392c48da8a
--- 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)