Skip to content
Snippets Groups Projects
Commit 374d7fff authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

store: use `endswith` to detect revlog extension

Suggested by Gregory Szorc.

Differential Revision: https://phab.mercurial-scm.org/D9865
parent d4c8b4b9
No related branches found
No related tags found
1 merge request!72ci: hook network-io tests into the pipeline
......@@ -387,7 +387,9 @@
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
......@@ -390,10 +392,8 @@
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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment