Patchwork D9749: persistent-nodemap: also list related file as part of the store

login
register
mail settings
Submitter phabricator
Date Jan. 13, 2021, 12:10 p.m.
Message ID <differential-rev-PHID-DREV-rnwbr3xrnacz7paqjbi2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48060/
State Superseded
Headers show

Comments

phabricator - Jan. 13, 2021, 12:10 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This make sure they are will be selected during upgrade, and copy based clone.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9749

AFFECTED FILES
  mercurial/store.py
  tests/test-persistent-nodemap.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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
@@ -626,8 +626,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)'
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -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):