D9810: persistent-nodemap: also exchange the nodemap data over the wire
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Sun Jan 17 19:29:41 UTC 2021
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
It appears that 2 bytes are never equals to 3 bytes.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9810
AFFECTED FILES
mercurial/store.py
tests/test-persistent-nodemap.t
CHANGE DETAILS
diff --git a/tests/test-persistent-nodemap.t b/tests/test-persistent-nodemap.t
--- a/tests/test-persistent-nodemap.t
+++ b/tests/test-persistent-nodemap.t
@@ -707,9 +707,11 @@
adding [s] 00manifest.n (70 bytes)
adding [s] 00manifest.i (313 KB)
adding [s] 00manifest.d (452 KB)
+ adding [s] 00manifest-*.nd (118 KB) (glob)
adding [s] 00changelog.n (70 bytes)
adding [s] 00changelog.i (313 KB)
adding [s] 00changelog.d (360 KB)
+ adding [s] 00changelog-*.nd (118 KB) (glob)
$ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
00changelog-*.nd (glob)
00changelog.n
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -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):
To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list