Show More
@@ -312,25 +312,6 b' def log(*msg):' | |||
|
312 | 312 | sys.stdout.flush() |
|
313 | 313 | iolock.release() |
|
314 | 314 | |
|
315 | def createhgrc(path, options): | |
|
316 | # create a fresh hgrc | |
|
317 | hgrc = open(path, 'w') | |
|
318 | hgrc.write('[ui]\n') | |
|
319 | hgrc.write('slash = True\n') | |
|
320 | hgrc.write('interactive = False\n') | |
|
321 | hgrc.write('[defaults]\n') | |
|
322 | hgrc.write('backout = -d "0 0"\n') | |
|
323 | hgrc.write('commit = -d "0 0"\n') | |
|
324 | hgrc.write('shelve = --date "0 0"\n') | |
|
325 | hgrc.write('tag = -d "0 0"\n') | |
|
326 | if options.extra_config_opt: | |
|
327 | for opt in options.extra_config_opt: | |
|
328 | section, key = opt.split('.', 1) | |
|
329 | assert '=' in key, ('extra config opt %s must ' | |
|
330 | 'have an = for assignment' % opt) | |
|
331 | hgrc.write('[%s]\n%s\n' % (section, key)) | |
|
332 | hgrc.close() | |
|
333 | ||
|
334 | 315 | def terminate(proc): |
|
335 | 316 | """Terminate subprocess (with fallback for Python versions < 2.6)""" |
|
336 | 317 | vlog('# Terminating process %d' % proc.pid) |
@@ -422,7 +403,7 b' class Test(object):' | |||
|
422 | 403 | replacements, port = self._getreplacements(testtmp) |
|
423 | 404 | env = self._getenv(testtmp, port) |
|
424 | 405 | self._daemonpids.append(env['DAEMON_PIDS']) |
|
425 |
createhgrc(env['HGRCPATH'] |
|
|
406 | self._createhgrc(env['HGRCPATH']) | |
|
426 | 407 | |
|
427 | 408 | vlog('# Test', self._test) |
|
428 | 409 | |
@@ -568,6 +549,25 b' class Test(object):' | |||
|
568 | 549 | |
|
569 | 550 | return env |
|
570 | 551 | |
|
552 | def _createhgrc(self, path): | |
|
553 | # create a fresh hgrc | |
|
554 | hgrc = open(path, 'w') | |
|
555 | hgrc.write('[ui]\n') | |
|
556 | hgrc.write('slash = True\n') | |
|
557 | hgrc.write('interactive = False\n') | |
|
558 | hgrc.write('[defaults]\n') | |
|
559 | hgrc.write('backout = -d "0 0"\n') | |
|
560 | hgrc.write('commit = -d "0 0"\n') | |
|
561 | hgrc.write('shelve = --date "0 0"\n') | |
|
562 | hgrc.write('tag = -d "0 0"\n') | |
|
563 | if self._options.extra_config_opt: | |
|
564 | for opt in self._options.extra_config_opt: | |
|
565 | section, key = opt.split('.', 1) | |
|
566 | assert '=' in key, ('extra config opt %s must ' | |
|
567 | 'have an = for assignment' % opt) | |
|
568 | hgrc.write('[%s]\n%s\n' % (section, key)) | |
|
569 | hgrc.close() | |
|
570 | ||
|
571 | 571 | def success(self): |
|
572 | 572 | return '.', self._test, '' |
|
573 | 573 |
General Comments 0
You need to be logged in to leave comments.
Login now