diff tests/test_util.py @ 1003:6945d3359456

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.
author David Schleimer <dschleimer@fb.com>
date Fri, 12 Apr 2013 15:41:51 -0700
parents 26aa0172725b
children aa043f64d8b7
line wrap: on
line diff
--- 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=':