changeset 46253:1cebad969d88

persistent-nodemap: also list related file as part of the store This make sure they are will be selected during upgrade, and copy based clone. Differential Revision: https://phab.mercurial-scm.org/D9749
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 12 Jan 2021 19:49:18 +0100
parents 8023991dc811
children c4b792fa109e
files mercurial/store.py tests/test-persistent-nodemap.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/store.py	Wed Jan 13 12:50:47 2021 +0100
+++ b/mercurial/store.py	Tue Jan 12 19:49:18 2021 +0100
@@ -389,7 +389,7 @@
 
 
 def isrevlog(f, kind, st):
-    return kind == stat.S_IFREG and f[-2:] in (b'.i', b'.d')
+    return kind == stat.S_IFREG and f[-2:] in (b'.i', b'.d', b'.n', b'.nd')
 
 
 class basicstore(object):
--- a/tests/test-persistent-nodemap.t	Wed Jan 13 12:50:47 2021 +0100
+++ b/tests/test-persistent-nodemap.t	Tue Jan 12 19:49:18 2021 +0100
@@ -617,8 +617,10 @@
 The persistent nodemap should exist after a streaming clone
 
   $ hg clone -U --stream --config ui.ssh="\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/test-repo stream-clone --debug | egrep '00(changelog|manifest)'
+  adding [s] 00manifest.n (70 bytes)
   adding [s] 00manifest.i (313 KB)
   adding [s] 00manifest.d (452 KB)
+  adding [s] 00changelog.n (70 bytes)
   adding [s] 00changelog.i (313 KB)
   adding [s] 00changelog.d (360 KB)
   $ ls -1 stream-clone/.hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'