This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcbc4425e81b5: tests: conditionalize tests based on presence 
of revlogs for files (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3030?vs=7596&id=7639

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

AFFECTED FILES
  tests/hghave.py
  tests/simplestorerepo.py
  tests/test-clone.t
  tests/test-contrib-perf.t
  tests/test-convert.t
  tests/test-copy.t
  tests/test-hardlinks.t
  tests/test-http-proxy.t
  tests/test-push-warn.t
  tests/test-relink.t
  tests/test-strip.t
  tests/test-subrepo-deep-nested-change.t
  tests/test-subrepo-recursion.t
  tests/test-upgrade-repo.t

CHANGE DETAILS

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -1,3 +1,5 @@
+#require no-reposimplestore
+
   $ cat >> $HGRCPATH << EOF
   > [extensions]
   > share =
diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
--- a/tests/test-subrepo-recursion.t
+++ b/tests/test-subrepo-recursion.t
@@ -462,6 +462,11 @@
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc)
   linking [        <=>                                    ] 8\r (no-eol) (esc)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
+  linking [          <=>                                 ] 10\r (no-eol) (esc) 
(reposimplestore !)
+  linking [           <=>                                ] 11\r (no-eol) (esc) 
(reposimplestore !)
+  linking [            <=>                               ] 12\r (no-eol) (esc) 
(reposimplestore !)
+  linking [             <=>                              ] 13\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
 #else
   $ hg clone -U . ../empty
@@ -487,6 +492,13 @@
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc)
   linking [        <=>                                    ] 8\r (no-eol) (esc)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
+  linking [          <=>                                 ] 10\r (no-eol) (esc) 
(reposimplestore !)
+  linking [           <=>                                ] 11\r (no-eol) (esc) 
(reposimplestore !)
+  linking [            <=>                               ] 12\r (no-eol) (esc) 
(reposimplestore !)
+  linking [             <=>                              ] 13\r (no-eol) (esc) 
(reposimplestore !)
+  linking [              <=>                             ] 14\r (no-eol) (esc) 
(reposimplestore !)
+  linking [               <=>                            ] 15\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
@@ -501,6 +513,9 @@
   linking [    <=>                                        ] 4\r (no-eol) (esc)
   linking [     <=>                                       ] 5\r (no-eol) (esc)
   linking [      <=>                                      ] 6\r (no-eol) (esc)
+  linking [       <=>                                     ] 7\r (no-eol) (esc) 
(reposimplestore !)
+  linking [        <=>                                    ] 8\r (no-eol) (esc) 
(reposimplestore !)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
diff --git a/tests/test-subrepo-deep-nested-change.t 
b/tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -34,6 +34,7 @@
   linking [    <=>                                        ] 4\r (no-eol) (esc)
   linking [     <=>                                       ] 5\r (no-eol) (esc)
   linking [      <=>                                      ] 6\r (no-eol) (esc)
+  linking [       <=>                                     ] 7\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 1/1\r (no-eol) (esc)
@@ -60,6 +61,9 @@
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc)
   linking [        <=>                                    ] 8\r (no-eol) (esc)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
+  linking [          <=>                                 ] 10\r (no-eol) (esc) 
(reposimplestore !)
+  linking [           <=>                                ] 11\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 3/3\r (no-eol) (esc)
@@ -71,6 +75,7 @@
   linking [    <=>                                        ] 4\r (no-eol) (esc)
   linking [     <=>                                       ] 5\r (no-eol) (esc)
   linking [      <=>                                      ] 6\r (no-eol) (esc)
+  linking [       <=>                                     ] 7\r (no-eol) (esc) 
(reposimplestore !)
   updating [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   updating to branch default
@@ -161,6 +166,9 @@
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc)
   linking [        <=>                                    ] 8\r (no-eol) (esc)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
+  linking [          <=>                                 ] 10\r (no-eol) (esc) 
(reposimplestore !)
+  linking [           <=>                                ] 11\r (no-eol) (esc) 
(reposimplestore !)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
   updating [===========================================>] 3/3\r (no-eol) (esc)
@@ -174,15 +182,25 @@
   linking [      <=>                                      ] 6\r (no-eol) (esc)
   linking [       <=>                                     ] 7\r (no-eol) (esc)
   linking [        <=>                                    ] 8\r (no-eol) (esc)
+  linking [         <=>                                   ] 9\r (no-eol) (esc) 
(reposimplestore !)
+  linking [          <=>                                 ] 10\r (no-eol) (esc) 
(reposimplestore !)
+  linking [           <=>                                ] 11\r (no-eol) (esc) 
(reposimplestore !)
   updating [===========================================>] 3/3\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   \r (no-eol) (esc)
-  linking [         <=>                                   ] 1\r (no-eol) (esc)
-  linking [          <=>                                  ] 2\r (no-eol) (esc)
-  linking [           <=>                                 ] 3\r (no-eol) (esc)
-  linking [            <=>                                ] 4\r (no-eol) (esc)
-  linking [             <=>                               ] 5\r (no-eol) (esc)
-  linking [              <=>                              ] 6\r (no-eol) (esc)
+  linking [         <=>                                   ] 1\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [          <=>                                  ] 2\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [           <=>                                 ] 3\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [            <=>                                ] 4\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [             <=>                               ] 5\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [              <=>                              ] 6\r (no-eol) (esc) 
(no-reposimplestore !)
+  linking [            <=>                                ] 1\r (no-eol) (esc) 
(reposimplestore !)
+  linking [             <=>                               ] 2\r (no-eol) (esc) 
(reposimplestore !)
+  linking [              <=>                              ] 3\r (no-eol) (esc) 
(reposimplestore !)
+  linking [               <=>                             ] 4\r (no-eol) (esc) 
(reposimplestore !)
+  linking [                <=>                            ] 5\r (no-eol) (esc) 
(reposimplestore !)
+  linking [                 <=>                           ] 6\r (no-eol) (esc) 
(reposimplestore !)
+  linking [                  <=>                          ] 7\r (no-eol) (esc) 
(reposimplestore !)
   updating [===========================================>] 1/1\r (no-eol) (esc)
                                                               \r (no-eol) (esc)
   updating to branch default
diff --git a/tests/test-strip.t b/tests/test-strip.t
--- a/tests/test-strip.t
+++ b/tests/test-strip.t
@@ -448,6 +448,7 @@
   $ cat .hg/store/fncache | sort
   data/a.i
   data/bar.i
+
   $ hg strip tip
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
diff --git a/tests/test-relink.t b/tests/test-relink.t
--- a/tests/test-relink.t
+++ b/tests/test-relink.t
@@ -73,6 +73,8 @@
 
 relink
 
+#if no-reposimplestore
+
   $ hg relink --debug --config progress.debug=true | fix_path
   relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store
   tip has 2 files, estimated total number of files: 3
@@ -101,3 +103,4 @@
   $ $PYTHON arelinked.py repo/.hg/store/data/b.i clone/.hg/store/data/b.i
   repo/.hg/store/data/b.i != clone/.hg/store/data/b.i
 
+#endif
diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
--- a/tests/test-push-warn.t
+++ b/tests/test-push-warn.t
@@ -153,7 +153,7 @@
   uncompressed size of bundle content:
        352 (changelog)
        326 (manifests)
-       253  foo
+       25\d  foo (re)
   adding changesets
   adding manifests
   adding file changes
diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t
--- a/tests/test-http-proxy.t
+++ b/tests/test-http-proxy.t
@@ -16,7 +16,8 @@
 
   $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True 
clone --stream http://localhost:$HGPORT/ b
   streaming all changes
-  3 files to transfer, 303 bytes of data
+  3 files to transfer, 303 bytes of data (reporevlogstore !)
+  4 files to transfer, 330 bytes of data (reposimplestore !)
   transferred * bytes in * seconds (*/sec) (glob)
   searching for changes
   no changes found
diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t
--- a/tests/test-hardlinks.t
+++ b/tests/test-hardlinks.t
@@ -1,4 +1,4 @@
-#require hardlink
+#require hardlink reporevlogstore
 
   $ cat > nlinks.py <<EOF
   > from __future__ import print_function
diff --git a/tests/test-copy.t b/tests/test-copy.t
--- a/tests/test-copy.t
+++ b/tests/test-copy.t
@@ -86,8 +86,10 @@
   copy: a
   copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
 
+#if reporevlogstore
   $ md5sum.py .hg/store/data/b.i
   44913824c8f5890ae218f9829535922e  .hg/store/data/b.i
+#endif
   $ hg cat b > bsum
   $ md5sum.py bsum
   60b725f10c9c85c70d97880dfe8191b3  bsum
diff --git a/tests/test-convert.t b/tests/test-convert.t
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -516,8 +516,14 @@
 contents of fncache file:
 
   $ cat b/.hg/store/fncache | sort
-  data/a.i
-  data/b.i
+  data/a.i (reporevlogstore !)
+  data/b.i (reporevlogstore !)
+  data/a/0f3078c2d7345d887b54f7c9dab0d91bfa57fd07 (reposimplestore !)
+  data/a/4271c3e84237016935a176b6f282fde2128458b0 (reposimplestore !)
+  data/a/b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (reposimplestore !)
+  data/a/index (reposimplestore !)
+  data/b/37d9b5d994eab34eda9c16b195ace52c7b129980 (reposimplestore !)
+  data/b/index (reposimplestore !)
 
 test bogus URL
 
diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t
--- a/tests/test-contrib-perf.t
+++ b/tests/test-contrib-perf.t
@@ -158,7 +158,9 @@
   $ hg perfpathcopies 1 2
   $ hg perfrawfiles 2
   $ hg perfrevlogindex -c
+#if reporevlogstore
   $ hg perfrevlogrevisions .hg/store/data/a.i
+#endif
   $ hg perfrevlogrevision -m 0
   $ hg perfrevlogchunks -c
   $ hg perfrevrange
diff --git a/tests/test-clone.t b/tests/test-clone.t
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -28,12 +28,14 @@
 
 List files in store/data (should show a 'b.d'):
 
+#if reporevlogstore
   $ for i in .hg/store/data/*; do
   >   echo $i
   > done
   .hg/store/data/a.i
   .hg/store/data/b.d
   .hg/store/data/b.i
+#endif
 
 Trigger branchcache creation:
 
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -5,6 +5,11 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
+# To use this with the test suite:
+#
+#   $ HGREPOFEATURES="simplestore" ./run-tests.py \
+#       --extra-config-opt extensions.simplestore=`pwd`/simplestorerepo.py
+
 from __future__ import absolute_import
 
 from mercurial.i18n import _
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -717,3 +717,47 @@
         return bdiff.xdiffblocks(b'', b'') == [(0, 0, 0, 0)]
     except (ImportError, AttributeError):
         return False
+
+def getrepofeatures():
+    """Obtain set of repository features in use.
+
+    HGREPOFEATURES can be used to define or remove features. It contains
+    a space-delimited list of feature strings. Strings beginning with ``-``
+    mean to remove.
+    """
+    # Default list provided by core.
+    features = {
+        'revlogstore',
+    }
+
+    # Features that imply other features.
+    implies = {
+        'simplestore': ['-revlogstore'],
+    }
+
+    for override in os.environ.get('HGREPOFEATURES', '').split(' '):
+        if not override:
+            continue
+
+        if override.startswith('-'):
+            if override[1:] in features:
+                features.remove(override[1:])
+        else:
+            features.add(override)
+
+            for imply in implies.get(override, []):
+                if imply.startswith('-'):
+                    if imply[1:] in features:
+                        features.remove(imply[1:])
+                else:
+                    features.add(imply)
+
+    return features
+
+@check('reporevlogstore', 'repository using the default revlog store')
+def has_reporevlogstore():
+    return 'revlogstore' in getrepofeatures()
+
+@check('reposimplestore', 'repository using simple storage extension')
+def has_reposimplestore():
+    return 'simplestore' in getrepofeatures()



To: indygreg, #hg-reviewers, durin42
Cc: durin42, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to