Patchwork [7,of,8] run-tests: define the default merge tool through configuration

login
register
mail settings
Submitter Boris Feld
Date Nov. 2, 2018, 9:31 a.m.
Message ID <6f27a7b59488df033a80.1541151117@localhost.localdomain>
Download mbox | patch
Permalink /patch/36330/
State Accepted
Headers show

Comments

Boris Feld - Nov. 2, 2018, 9:31 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1541078961 -3600
#      Thu Nov 01 14:29:21 2018 +0100
# Node ID 6f27a7b59488df033a80006b552e56c16f6acb44
# Parent  b95aef679522bd42e7041373b5af9ca4ab9ce004
# EXP-Topic run-tests
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6f27a7b59488
run-tests: define the default merge tool through configuration

Using the `HGMERGE` environment variable generates confusion as it overrides
any value set through configuration.
By setting the default value through the default HGRC, the usual overriding
rules apply and it should reduce confusion.

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1078,7 +1078,6 @@  class Test(unittest.TestCase):
                                                    b'daemon.pids'))
         env["HGEDITOR"] = ('"' + sys.executable + '"'
                            + ' -c "import sys; sys.exit(0)"')
-        env["HGMERGE"] = "internal:merge"
         env["HGUSER"]   = "test"
         env["HGENCODING"] = "ascii"
         env["HGENCODINGMODE"] = "strict"
@@ -1116,6 +1115,7 @@  class Test(unittest.TestCase):
             'EDITOR',
             'GREP_OPTIONS',
             'HG',
+            'HGMERGE',
             'HGPLAIN',
             'HGPLAINEXCEPT',
             'HGPROF',
@@ -1146,6 +1146,7 @@  class Test(unittest.TestCase):
             hgrc.write(b'[ui]\n')
             hgrc.write(b'slash = True\n')
             hgrc.write(b'interactive = False\n')
+            hgrc.write(b'merge = internal:merge\n')
             hgrc.write(b'mergemarkers = detailed\n')
             hgrc.write(b'promptecho = True\n')
             hgrc.write(b'[defaults]\n')
diff --git a/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -9,6 +9,7 @@  Create a repository:
   lfs.usercache=$TESTTMP/.cache/lfs
   ui.slash=True
   ui.interactive=False
+  ui.merge=internal:merge
   ui.mergemarkers=detailed
   ui.promptecho=True
   web.address=localhost
diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
--- a/tests/test-commandserver.t
+++ b/tests/test-commandserver.t
@@ -211,6 +211,7 @@  check that local configs for the cached 
   lfs.usercache=$TESTTMP/.cache/lfs
   ui.slash=True
   ui.interactive=False
+  ui.merge=internal:merge
   ui.mergemarkers=detailed
   ui.foo=bar
   ui.nontty=true
@@ -221,6 +222,7 @@  check that local configs for the cached 
   *** runcommand -R foo showconfig ui defaults
   ui.slash=True
   ui.interactive=False
+  ui.merge=internal:merge
   ui.mergemarkers=detailed
   ui.nontty=true
 #endif