Show More
@@ -362,6 +362,17 b' def createhgrc(path, options):' | |||
|
362 | 362 | hgrc.write('[%s]\n%s\n' % (section, key)) |
|
363 | 363 | hgrc.close() |
|
364 | 364 | |
|
365 | def createenv(options, testtmp): | |
|
366 | env = os.environ.copy() | |
|
367 | env['TESTTMP'] = testtmp | |
|
368 | env['HOME'] = testtmp | |
|
369 | env["HGPORT"] = str(options.port) | |
|
370 | env["HGPORT1"] = str(options.port + 1) | |
|
371 | env["HGPORT2"] = str(options.port + 2) | |
|
372 | env["HGRCPATH"] = os.path.join(HGTMP, '.hgrc') | |
|
373 | env["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') | |
|
374 | ||
|
375 | return env | |
|
365 | 376 | |
|
366 | 377 | def checktools(): |
|
367 | 378 | # Before we go any further, check for pre-requisite tools |
@@ -927,15 +938,7 b' def runone(options, test):' | |||
|
927 | 938 | else: |
|
928 | 939 | replacements.append((re.escape(testtmp), '$TESTTMP')) |
|
929 | 940 | |
|
930 | env = os.environ.copy() | |
|
931 | env['TESTTMP'] = testtmp | |
|
932 | env['HOME'] = testtmp | |
|
933 | env["HGPORT"] = str(options.port) | |
|
934 | env["HGPORT1"] = str(options.port + 1) | |
|
935 | env["HGPORT2"] = str(options.port + 2) | |
|
936 | env["HGRCPATH"] = os.path.join(HGTMP, '.hgrc') | |
|
937 | env["DAEMON_PIDS"] = os.path.join(HGTMP, 'daemon.pids') | |
|
938 | ||
|
941 | env = createenv(options, testtmp) | |
|
939 | 942 | createhgrc(env['HGRCPATH'], options) |
|
940 | 943 | |
|
941 | 944 | if options.time: |
General Comments 0
You need to be logged in to leave comments.
Login now