# HG changeset patch # User Jeff Hammel # Date 1355288666 28800 # Node ID daf7c333e01c8dbae091446e0035d801cf3aaeca # Parent 864172062af71be1df0e662f30aff0380e2a0b42 add bug to options diff -r 864172062af7 -r daf7c333e01c mozillatry.py --- a/mozillatry.py Mon Dec 10 12:56:12 2012 -0800 +++ b/mozillatry.py Tue Dec 11 21:04:26 2012 -0800 @@ -102,11 +102,15 @@ class MozillaTryConfiguration(configuration.Configuration): + # default configuration file + # TODO: upstream the pattern to configuration but with default_config_file = None default_config_file = os.path.join('~', '.mozutils') usage = '%prog [options] patch <...>' load_help = 'load from config file' if os.path.exists(os.path.expanduser(default_config_file)): load_help += ' [DEFAULT: %s]' % default_config_file + + # configuration options options = {'opt': {'default': True, 'help': "whether to try on opt builds"}, 'debug': {'default': True, @@ -122,7 +126,10 @@ 'flags': ['-t', '--talostests']}, 'mozilla_central': {'help': "path to mozilla-central clone", 'required': True, - 'flags': ["--m-c", "--mozilla-central"]} + 'flags': ["--m-c", "--mozilla-central"]}, + 'bug': {'help': "bug number to post try results to", + 'type': int, + 'flags': ['-b', '--bug']} } # configuration items to interpolate as paths @@ -180,7 +187,8 @@ commit = try_syntax(opt=options.opt, debug=options.debug, unittests=options.unittests, - talos=options.talostests + talos=options.talostests, + bug=options.bug ) print commit