equal
deleted
inserted
replaced
404 help='show scheduling channels') |
404 help='show scheduling channels') |
405 parser.add_option('--known-good-rev', type="string", |
405 parser.add_option('--known-good-rev', type="string", |
406 metavar="known_good_rev", |
406 metavar="known_good_rev", |
407 help=("Automatically bisect any failures using this " |
407 help=("Automatically bisect any failures using this " |
408 "revision as a known-good revision.")) |
408 "revision as a known-good revision.")) |
|
409 parser.add_option('--bisect-repo', type="string", |
|
410 metavar='bisect_repo', |
|
411 help=("Path of a repo to bisect. Use together with " |
|
412 "--known-good-rev")) |
409 |
413 |
410 for option, (envvar, default) in defaults.items(): |
414 for option, (envvar, default) in defaults.items(): |
411 defaults[option] = type(default)(os.environ.get(envvar, default)) |
415 defaults[option] = type(default)(os.environ.get(envvar, default)) |
412 parser.set_defaults(**defaults) |
416 parser.set_defaults(**defaults) |
413 |
417 |
455 '(use --with-chg instead)') |
459 '(use --with-chg instead)') |
456 |
460 |
457 if options.color == 'always' and not pygmentspresent: |
461 if options.color == 'always' and not pygmentspresent: |
458 sys.stderr.write('warning: --color=always ignored because ' |
462 sys.stderr.write('warning: --color=always ignored because ' |
459 'pygments is not installed\n') |
463 'pygments is not installed\n') |
|
464 |
|
465 if options.bisect_repo and not options.known_good_rev: |
|
466 parser.error("--bisect-repo cannot be used without --known-good-rev") |
460 |
467 |
461 global useipv6 |
468 global useipv6 |
462 if options.ipv6: |
469 if options.ipv6: |
463 useipv6 = checksocketfamily('AF_INET6') |
470 useipv6 = checksocketfamily('AF_INET6') |
464 else: |
471 else: |
2069 |
2076 |
2070 savetimes(self._runner._outputdir, result) |
2077 savetimes(self._runner._outputdir, result) |
2071 |
2078 |
2072 if failed and self._runner.options.known_good_rev: |
2079 if failed and self._runner.options.known_good_rev: |
2073 bisectcmd = ['hg', 'bisect'] |
2080 bisectcmd = ['hg', 'bisect'] |
|
2081 bisectrepo = self._runner.options.bisect_repo |
|
2082 if bisectrepo: |
|
2083 bisectcmd.extend(['-R', os.path.abspath(bisectrepo)]) |
2074 def nooutput(args): |
2084 def nooutput(args): |
2075 p = subprocess.Popen(args, stderr=subprocess.STDOUT, |
2085 p = subprocess.Popen(args, stderr=subprocess.STDOUT, |
2076 stdout=subprocess.PIPE) |
2086 stdout=subprocess.PIPE) |
2077 p.stdout.read() |
2087 p.stdout.read() |
2078 p.wait() |
2088 p.wait() |