Commits

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
HGRCPATH.

  • Participants
  • Parent commits 117b3b4

Comments (0)

Files changed (2)

File tests/test_util.py

 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')
         rc.write('[ui]\nusername=test-user\n')
         for l in '[extensions]', 'hgsubversion=':

File tests/test_utility_commands.py

         # 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),
           ]