David Schleimer committed 6945d33

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

  • Participants
  • Parent commits 117b3b4

Comments (0)

Files changed (2)

File tests/

 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
             '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')
         for l in '[extensions]', 'hgsubversion=':

File tests/

         # rebuildmeta --unsafe-skip-uuid-check with unrelated repo
         svncommands.rebuildmeta(self.ui(), repo=self.repo, args=[otherurl],
 def suite():
     all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests),