ensure that HGUSER doesn't impact the tests

Summary:
I had this set and it broke some of the integration tests.
Force it to be unset before running the tests.

Reviewed By: simpkins

Differential Revision: D5712624

fbshipit-source-id: 7d4aef86ef56f5880180b417e356e8a85abf11d7
This commit is contained in:
Wez Furlong 2017-08-25 21:46:29 -07:00 committed by Facebook Github Bot
parent 8fb37c1ada
commit 948b584229

View File

@ -57,6 +57,10 @@ class HgRepository(repobase.Repository):
'''
super().__init__(path)
self.hg_environment = os.environ.copy()
# Drop any environment variables starting with 'HG'
# to ensure the user's environment does not affect the tests
self.hg_environment = dict((k, v) for k, v in os.environ.items()
if not k.startswith('HG'))
self.hg_environment['HGPLAIN'] = '1'
# Set HGRCPATH to make sure we aren't affected by the local system's
# mercurial settings from /etc/mercurial/