# HG changeset patch # User David Schleimer # Date 1365806511 25200 # Node ID 6945d335945667e7969902d783ccf189575e0349 # Parent 117b3b42129401e89e1695603579a56d30a6ba33 testutil: clear rcpath when we update HGRCPATH env var hg maintains a global cache of the HGRCPATH that doesn't get updated when HGRCPATH is changed. Nuke said global cache when we change the HGRCPATH. diff --git a/tests/test_util.py b/tests/test_util.py --- a/tests/test_util.py +++ b/tests/test_util.py @@ -22,6 +22,7 @@ from mercurial import dispatch as dispat from mercurial import hg from mercurial import i18n from mercurial import node +from mercurial import scmutil from mercurial import ui from mercurial import util from mercurial import extensions @@ -258,6 +259,7 @@ class TestBase(unittest.TestCase): 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None)) self.hgrc = os.path.join(self.tmpdir, '.hgrc') os.environ['HGRCPATH'] = self.hgrc + scmutil._rcpath = None rc = open(self.hgrc, 'w') rc.write('[ui]\nusername=test-user\n') for l in '[extensions]', 'hgsubversion=': diff --git a/tests/test_utility_commands.py b/tests/test_utility_commands.py --- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -341,7 +341,7 @@ missing file: binary3 # rebuildmeta --unsafe-skip-uuid-check with unrelated repo svncommands.rebuildmeta(self.ui(), repo=self.repo, args=[otherurl], unsafe_skip_uuid_check=True) - + def suite(): all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), ]