rhg: add a test with persistent-nodemap
authorSimon Sapin <simon-commits@exyr.org>
Wed, 02 Dec 2020 08:23:31 +0100
changeset 46034 0c02c2a0badb
parent 46033 88e741bf2d93
child 46035 6c960b708ac4
rhg: add a test with persistent-nodemap Differential Revision: https://phab.mercurial-scm.org/D9519
tests/test-rhg.t
--- a/tests/test-rhg.t	Wed Dec 02 15:00:49 2020 +0100
+++ b/tests/test-rhg.t	Wed Dec 02 08:23:31 2020 +0100
@@ -165,3 +165,36 @@
   $ rhg debugrequirements
   abort: .hg/requires is corrupted
   [255]
+
+Persistent nodemap
+  $ cd $TESTTMP
+  $ rm -rf repository
+  $ hg init repository
+  $ cd repository
+  $ rhg debugrequirements | grep nodemap
+  [1]
+  $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
+  $ hg id -r tip
+  c3ae8dec9fad tip
+  $ ls .hg/store/00changelog*
+  .hg/store/00changelog.d
+  .hg/store/00changelog.i
+  $ rhg files -r c3ae8dec9fad
+  of
+
+  $ cd $TESTTMP
+  $ rm -rf repository
+  $ hg --config format.use-persistent-nodemap=True init repository
+  $ cd repository
+  $ rhg debugrequirements | grep nodemap
+  persistent-nodemap
+  $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
+  $ hg id -r tip
+  c3ae8dec9fad tip
+  $ ls .hg/store/00changelog*
+  .hg/store/00changelog-*.nd (glob)
+  .hg/store/00changelog.d
+  .hg/store/00changelog.i
+  .hg/store/00changelog.n
+  $ rhg files -r c3ae8dec9fad
+  [252]