Patchwork [2,of,3] tests: restore workaround of obsolete warning from 3c9066ed557c

login
register
mail settings
Submitter Yuya Nishihara
Date July 2, 2017, 7:12 a.m.
Message ID <cd11e4cb52da6e5ab6cd.1498979525@mimosa>
Download mbox | patch
Permalink /patch/21916/
State Accepted
Headers show

Comments

Yuya Nishihara - July 2, 2017, 7:12 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1498969228 -32400
#      Sun Jul 02 13:20:28 2017 +0900
# Node ID cd11e4cb52da6e5ab6cd73249b81e25e98e46009
# Parent  8dfe0afe4c411739107e498561169b75e1d5383a
tests: restore workaround of obsolete warning from 3c9066ed557c

It's simple and works well unless you are using third-party extensions
that changes the store format.

Patch

diff --git a/tests/helpers-testrepo.sh b/tests/helpers-testrepo.sh
--- a/tests/helpers-testrepo.sh
+++ b/tests/helpers-testrepo.sh
@@ -23,6 +23,24 @@  syshgenv () {
     export HGPLAIN
 }
 
+# The test-repo is a live hg repository which may have evolution markers
+# created, e.g. when a ~/.hgrc enabled evolution.
+#
+# Tests may be run using a custom HGRCPATH, which do not enable evolution
+# markers by default.
+#
+# If test-repo includes evolution markers, and we do not enable evolution
+# markers, hg will occasionally complain when it notices them, which disrupts
+# tests resulting in sporadic failures.
+#
+# Since we aren't performing any write operations on the test-repo, there's
+# no harm in telling hg that we support evolution markers, which is what the
+# following lines for the hgrc file do:
+cat >> "$HGRCPATH" << EOF
+[experimental]
+evolution = createmarkers
+EOF
+
 # Most test-check-* sourcing this file run "hg files", which is not available
 # in ancient versions of hg. So we double check if "syshg files" works and
 # fallback to hg bundled in the repo.