<p dir="ltr">Let's have a helper script which does this and just . include it from all the scripts that use it.</p>
<div class="gmail_quote">On May 6, 2016 10:28 PM, "Matt Harbison" <<a href="mailto:mharbison72@gmail.com">mharbison72@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Matt Harbison <<a href="mailto:matt_harbison@yahoo.com">matt_harbison@yahoo.com</a>><br>
# Date 1462585858 14400<br>
#      Fri May 06 21:50:58 2016 -0400<br>
# Node ID f3156cc10f6d6df6463f534279a3bd73a85fc06b<br>
# Parent  af6d4a49e3615ac6cfa63b9c10811c28520434ea<br>
tests: avoid obsolete marker warnings on the hg code repo without evolve<br>
<br>
These tests run on the local Mercurial repository.  If evolve is enabled in a<br>
config file other than the local file, it isn't loaded for the test, causing the<br>
warning to be emitted if obsolete markers are found.  (Having said that, I see<br>
that the Linux install I have enables evolve only from the user config, so maybe<br>
this is somehow Windows specific?)<br>
<br>
The problem tests observed between timeless and I were limited to *-shbang.t and<br>
*-execute.t.  But since check-commit.t also had this from the beginning, I added<br>
this to all of the other check-* tests with #require test-repo for consistency.<br>
<br>
diff --git a/tests/test-check-code.t b/tests/test-check-code.t<br>
--- a/tests/test-check-code.t<br>
+++ b/tests/test-check-code.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ check_code="$TESTDIR"/../contrib/check-code.py<br>
   $ cd "$TESTDIR"/..<br>
<br>
diff --git a/tests/test-check-config.t b/tests/test-check-config.t<br>
--- a/tests/test-check-config.t<br>
+++ b/tests/test-check-config.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ cd "$TESTDIR"/..<br>
<br>
 New errors are not allowed. Warnings are strongly discouraged.<br>
diff --git a/tests/test-check-execute.t b/tests/test-check-execute.t<br>
--- a/tests/test-check-execute.t<br>
+++ b/tests/test-check-execute.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo execbit<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ cd "`dirname "$TESTDIR"`"<br>
<br>
 look for python scripts without the execute bit<br>
diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t<br>
--- a/tests/test-check-module-imports.t<br>
+++ b/tests/test-check-module-imports.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ import_checker="$TESTDIR"/../contrib/import-checker.py<br>
<br>
 Run the doctests from the import checker, and make sure<br>
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t<br>
--- a/tests/test-check-py3-compat.t<br>
+++ b/tests/test-check-py3-compat.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ cd "$TESTDIR"/..<br>
<br>
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py<br>
diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t<br>
--- a/tests/test-check-pyflakes.t<br>
+++ b/tests/test-check-pyflakes.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo pyflakes<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ cd "`dirname "$TESTDIR"`"<br>
<br>
 run pyflakes on all tracked files ending in .py or without a file ending<br>
diff --git a/tests/test-check-shbang.t b/tests/test-check-shbang.t<br>
--- a/tests/test-check-shbang.t<br>
+++ b/tests/test-check-shbang.t<br>
@@ -1,5 +1,11 @@<br>
 #require test-repo<br>
<br>
+  $ cat >> $HGRCPATH <<EOF<br>
+  > # Silence "obsolete feature not enabled, but markers found" warnings<br>
+  > [experimental]<br>
+  > evolution=createmarkers<br>
+  > EOF<br>
+<br>
   $ cd "`dirname "$TESTDIR"`"<br>
<br>
 look for python scripts that do not use /usr/bin/env<br>
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@mercurial-scm.org">Mercurial-devel@mercurial-scm.org</a><br>
<a href="https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div>