Patchwork D10698: dirstate-tree: Add a dirstate-v1-tree variant of some tests

login
register
mail settings
Submitter phabricator
Date May 7, 2021, 4:46 p.m.
Message ID <differential-rev-PHID-DREV-t7jj64olsc4hpakypgj7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49020/
State Superseded
Headers show

Comments

phabricator - May 7, 2021, 4:46 p.m.
SimonSapin created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The `dirstate-v1` variant has the previous behavior.
  
  `dirstate-v1-tree` uses the same format on disk, but uses the new
  `DirstateMap` with a tree data structure and the new `status` algorithm.
  These were untested so far.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-dirstate-race.t
  tests/test-dirstate-race2.t
  tests/test-dirstate.t
  tests/test-hgignore.t
  tests/test-permissions.t
  tests/test-purge.t
  tests/test-status.t
  tests/test-symlinks.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-symlinks.t b/tests/test-symlinks.t
--- a/tests/test-symlinks.t
+++ b/tests/test-symlinks.t
@@ -1,5 +1,13 @@ 
 #require symlink
 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
 == tests added in 0.7 ==
 
   $ hg init test-symlinks-0.7; cd test-symlinks-0.7;
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
   $ hg init repo1
   $ cd repo1
   $ mkdir a b a/1 b/1 b/2
diff --git a/tests/test-purge.t b/tests/test-purge.t
--- a/tests/test-purge.t
+++ b/tests/test-purge.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
 init
 
   $ hg init t
diff --git a/tests/test-permissions.t b/tests/test-permissions.t
--- a/tests/test-permissions.t
+++ b/tests/test-permissions.t
@@ -1,5 +1,13 @@ 
 #require unix-permissions no-root reporevlogstore
 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
   $ hg init t
   $ cd t
 
diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
   $ hg init ignorerepo
   $ cd ignorerepo
 
diff --git a/tests/test-dirstate.t b/tests/test-dirstate.t
--- a/tests/test-dirstate.t
+++ b/tests/test-dirstate.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
 ------ Test dirstate._dirs refcounting
 
   $ hg init t
diff --git a/tests/test-dirstate-race2.t b/tests/test-dirstate-race2.t
--- a/tests/test-dirstate-race2.t
+++ b/tests/test-dirstate-race2.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
 Checking the size/permissions/file-type of files stored in the
 dirstate after an update where the files are changed concurrently
 outside of hg's control.
diff --git a/tests/test-dirstate-race.t b/tests/test-dirstate-race.t
--- a/tests/test-dirstate-race.t
+++ b/tests/test-dirstate-race.t
@@ -1,3 +1,11 @@ 
+#testcases dirstate-v1 dirstate-v1-tree
+
+#if dirstate-v1-tree
+#require rust
+  $ echo '[experimental]' >> $HGRCPATH
+  $ echo 'dirstate-tree.in-memory=1' >> $HGRCPATH
+#endif
+
   $ hg init repo
   $ cd repo
   $ echo a > a