Mercurial > hgsubversion
comparison tests/test_util.py @ 1552:ed2df771f578
test_util: modernize writing of hgrc
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 24 Mar 2018 15:41:46 -0400 |
parents | 8410a978c650 |
children | 258fb67fb956 |
comparison
equal
deleted
inserted
replaced
1551:22137e94411f | 1552:ed2df771f578 |
---|---|
495 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None)) | 495 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None)) |
496 os.chdir(self.tmpdir) | 496 os.chdir(self.tmpdir) |
497 self.hgrc = os.path.join(self.tmpdir, '.hgrc') | 497 self.hgrc = os.path.join(self.tmpdir, '.hgrc') |
498 os.environ['HGRCPATH'] = self.hgrc | 498 os.environ['HGRCPATH'] = self.hgrc |
499 scmutil._rcpath = None | 499 scmutil._rcpath = None |
500 rc = open(self.hgrc, 'w') | 500 with open(self.hgrc, 'w') as rc: |
501 rc.write('[ui]\nusername=test-user\n') | 501 rc.write('[ui]\nusername=test-user\n') |
502 for l in '[extensions]', 'hgsubversion=': | 502 rc.write('[extensions]\nhgsubversion=\n') |
503 print >> rc, l | |
504 | 503 |
505 self.repocount = 0 | 504 self.repocount = 0 |
506 self.wc_path = '%s/testrepo_wc' % self.tmpdir | 505 self.wc_path = '%s/testrepo_wc' % self.tmpdir |
507 self.svn_wc = None | 506 self.svn_wc = None |
508 | 507 |