mercurial/store.py
changeset 46383 374d7fff7cb5
parent 46322 7c1367c0b5bc
child 46607 e9901d01d135
--- a/mercurial/store.py	Tue Dec 01 12:59:33 2020 -0500
+++ b/mercurial/store.py	Mon Jan 25 16:34:43 2021 +0100
@@ -387,13 +387,13 @@
     b'requires',
 ]
 
+REVLOG_FILES_EXT = (b'.i', b'.d', b'.n', b'.nd')
+
 
 def isrevlog(f, kind, st):
     if kind != stat.S_IFREG:
         return False
-    if f[-2:] in (b'.i', b'.d', b'.n'):
-        return True
-    return f[-3:] == b'.nd'
+    return f.endswith(REVLOG_FILES_EXT)
 
 
 class basicstore(object):