Mercurial > hg
diff tests/test-trusted.py @ 5523:5db730475d6d
tests/*: avoid losing the original settings from $HGRCPATH
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 09 Nov 2007 20:21:35 -0200 |
parents | 96d8a56d4ef9 |
children | 6b5522cb2ad2 |
line wrap: on
line diff
--- a/tests/test-trusted.py Fri Nov 09 20:21:35 2007 -0200 +++ b/tests/test-trusted.py Fri Nov 09 20:21:35 2007 -0200 @@ -6,6 +6,9 @@ from mercurial import ui, util hgrc = os.environ['HGRCPATH'] +f = open(hgrc) +basehgrc = f.read() +f.close() def testui(user='foo', group='bar', tusers=(), tgroups=(), cuser='foo', cgroup='bar', debug=False, silent=False): @@ -16,7 +19,8 @@ # write a global hgrc with the list of trusted users/groups and # some setting so that we can be sure it was read f = open(hgrc, 'w') - f.write('[paths]\n') + f.write(basehgrc) + f.write('\n[paths]\n') f.write('global = /some/path\n\n') if tusers or tgroups: