Mercurial > hg-stable
changeset 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 | d32e7ed81f4f |
children | 723d241543b0 |
files | mercurial/store.py tests/test-persistent-nodemap.t |
diffstat | 2 files changed, 7 insertions(+), 1 deletions(-) [+] |
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):
--- a/tests/test-persistent-nodemap.t Sun Jan 17 19:22:30 2021 +0100 +++ b/tests/test-persistent-nodemap.t Sun Jan 17 20:27:59 2021 +0100 @@ -708,9 +708,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