diff mercurial/store.py @ 46322:7c1367c0b5bc

persistent-nodemap: also exchange the nodemap data over the wire It appears that 2 bytes are never equals to 3 bytes. Differential Revision: https://phab.mercurial-scm.org/D9810
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 17 Jan 2021 20:27:59 +0100
parents 1cebad969d88
children 374d7fff7cb5
line wrap: on
line diff
--- a/mercurial/store.py	Sun Jan 17 19:22:30 2021 +0100
+++ b/mercurial/store.py	Sun Jan 17 20:27:59 2021 +0100
@@ -389,7 +389,11 @@
 
 
 def isrevlog(f, kind, st):
-    return kind == stat.S_IFREG and f[-2:] in (b'.i', b'.d', b'.n', b'.nd')
+    if kind != stat.S_IFREG:
+        return False
+    if f[-2:] in (b'.i', b'.d', b'.n'):
+        return True
+    return f[-3:] == b'.nd'
 
 
 class basicstore(object):