Mercurial > mozilla > hg > MozillaTry
annotate mozillatry.py @ 17:7ca5d9a3b157
expanduser
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 04 Dec 2012 16:50:20 -0800 |
parents | 6a3754236d1f |
children | 328e88120fc2 |
rev | line source |
---|---|
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/usr/bin/env python |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 push patches to try |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 """ |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
4
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
7 import configuration |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 import optparse |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 import os |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 import sys |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 from subprocess import check_call as call |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 def reset(directory): |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 """reset an hg directory to a good state""" |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
16 assert os.path.exists(directory) and os.path.isdir(directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
17 hg_dir = os.path.join(directory, '.hg') |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
18 assert os.path.exists(hg_dir) and os.path.isdir(hg_dir) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
19 call(['hg', 'revert', '--no-backup', '--all'], cwd=directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
20 call(['hg', 'qpop', '--all'], cwd=directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
21 try: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
22 shutil.rmtree(os.path.join(hg_dir, 'patches')) # remove patches |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
23 except: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
24 pass |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
25 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
26 def update(directory): |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
27 """update a mozilla-central checkout""" |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
28 assert os.path.exists(directory) and os.path.isdir(directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
29 reset(directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
30 call(['hg', 'pull'], cwd=directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
31 call(['hg', 'update'], cwd=directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
32 call(['hg', 'qinit'], cwd=directory) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
33 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
34 def push_to_try(patches, repo, commit, _try='ssh://hg.mozilla.org/try/'): |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
35 """push a series of patches to try repository""" |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
36 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
37 # ensure the repo is in a good state |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
38 update(repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
39 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
40 try: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
41 # apply patches |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
42 for patch in patches: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
43 call(['hg', 'qimport', patch], cwd=repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
44 call(['hg', 'qpush', '--all'], cwd=repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
45 call(['hg', 'qseries', '-v'], cwd=repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
46 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
47 # push to try |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
48 call(['hg', 'qref', '--message', commit], cwd=repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
49 call(['hg', 'push', '-f', _try], cwd=repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
50 finally: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
51 reset(repo) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
52 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
53 def try_syntax(opt=True, debug=True, unittests=('all'), talos=('all'), bug=None): |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
54 """ |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
55 return try syntax; see also: |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
56 - https://github.com/pbiggar/trychooser |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
57 - http://trychooser.pub.build.mozilla.org/ |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
58 """ |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
59 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
60 assert opt or debug |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
61 message = ['try:'] |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
62 message += ['-b', '%s%s' % (('d' if debug else ''), ('o' if opt else ''))] |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
63 message += ['-u', (','.join(unittests) if unittests else 'none')] |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
64 message += ['-t', (','.join(talos) if talos else 'none')] |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
65 if bug: |
6
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
66 message += ['--post-to-bugzilla', 'Bug', str(bug)] |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
67 return ' '.join(message) |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
68 |
7
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
69 ### configuration parsing |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
70 |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
71 class ConfigurationError(Exception): |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
72 """error when checking configuration""" |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
73 |
4
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
74 class MozillaTryConfiguration(configuration.Configuration): |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
75 |
9 | 76 default_config_file = os.path.join('~', '.mozutils.yaml') |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
77 usage = '%prog [options] patch <patch2> <...>' |
9 | 78 load_help = 'load from config file' |
79 if os.path.exists(os.path.expanduser(default_config_file)): | |
10
f0bca08e296a
start looking for config file
Jeff Hammel <jhammel@mozilla.com>
parents:
9
diff
changeset
|
80 load_help += ' [DEFAULT: %s]' % default_config_file |
4
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
81 options = {'opt': {'default': True, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
82 'help': "whether to try on opt builds"}, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
83 'debug': {'default': True, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
84 'help': "whether to try on debug builds"}, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
85 'unittests': {'default': [], |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
86 'help': "unit tests to run", |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
87 'flags': ['-u', '--unittests']}, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
88 'talostests': {'default': [], |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
89 'help': "talos tests to run", |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
90 'flags': ['-t', '--talostests']}, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
91 'mozilla_central': {'help': "path to mozilla-central clone", |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
92 'required': True, |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
93 'flags': ["--m-c", "--mozilla-central"]} |
14275dcbff10
begin switching to configuration package
Jeff Hammel <jhammel@mozilla.com>
parents:
3
diff
changeset
|
94 } |
2
3eaee0d10880
make getting mozilla-central slightly less of a hack; soon, we should transition to configuration to make this nice, though lets build the API around it first for now
Jeff Hammel <jhammel@mozilla.com>
parents:
1
diff
changeset
|
95 |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
96 def __init__(self): |
6
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
97 configuration.Configuration.__init__(self, usage=self.usage, load='--config') |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
98 |
8 | 99 def validate(self): |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
100 """check configuration""" |
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
101 |
8 | 102 configuration.Configuration.validate(self) |
103 | |
104 if (not self.config.get('opt')) and (not self.config.get('debug')): | |
7
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
105 raise ConfigurationError("Must have opt or debug builds") |
5
416f4562005c
more switching to configuration parser
Jeff Hammel <jhammel@mozilla.com>
parents:
4
diff
changeset
|
106 |
17 | 107 self.config['mozilla_central'] = os.path.expanduser(self.config['mozilla_central']) |
14
06b8783eae81
move another check to validate
Jeff Hammel <jhammel@mozilla.com>
parents:
13
diff
changeset
|
108 try_directory = self.config.get('mozilla_central') |
06b8783eae81
move another check to validate
Jeff Hammel <jhammel@mozilla.com>
parents:
13
diff
changeset
|
109 if (try_directory is None) or (not os.path.exists(try_directory)): |
15 | 110 raise ConfigurationError("mozilla-central directory does not exist: %s" % try_directory) |
14
06b8783eae81
move another check to validate
Jeff Hammel <jhammel@mozilla.com>
parents:
13
diff
changeset
|
111 |
16 | 112 # TODO: make a 'path' type |
113 | |
11
9b90cf893943
default configuration file
Jeff Hammel <jhammel@mozilla.com>
parents:
10
diff
changeset
|
114 def configuration_files(self, options, args): |
12 | 115 configuration_files = configuration.Configuration.configuration_files(self, options, args) |
11
9b90cf893943
default configuration file
Jeff Hammel <jhammel@mozilla.com>
parents:
10
diff
changeset
|
116 if not configuration_files: |
12 | 117 default_config = os.path.expanduser(self.default_config_file) |
11
9b90cf893943
default configuration file
Jeff Hammel <jhammel@mozilla.com>
parents:
10
diff
changeset
|
118 if os.path.exists(default_config): |
9b90cf893943
default configuration file
Jeff Hammel <jhammel@mozilla.com>
parents:
10
diff
changeset
|
119 configuration_files = [default_config] |
9b90cf893943
default configuration file
Jeff Hammel <jhammel@mozilla.com>
parents:
10
diff
changeset
|
120 return configuration_files |
1
0f8e4a3b4e1c
split add_options to its own method for consumption
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
121 |
13
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
122 def load_configuration_file(self, filename): |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
123 config = configuration.Configuration.load_configuration_file(self, filename) |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
124 |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
125 # ignore options that we don't care about |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
126 config = dict([(key, value) for key, value in config.items() |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
127 if key in self.option_dict]) |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
128 return config |
1e90d869f787
only use the configuration values we need
Jeff Hammel <jhammel@mozilla.com>
parents:
12
diff
changeset
|
129 |
1
0f8e4a3b4e1c
split add_options to its own method for consumption
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
130 def main(args=sys.argv[1:]): |
0f8e4a3b4e1c
split add_options to its own method for consumption
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
131 |
0f8e4a3b4e1c
split add_options to its own method for consumption
Jeff Hammel <jhammel@mozilla.com>
parents:
0
diff
changeset
|
132 # parse command line arguments |
6
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
133 parser = MozillaTryConfiguration() |
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
134 options, args = parser.parse_args() |
7
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
135 if not args: |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
136 parser.print_usage() |
51d1167cc684
something still wrong here but on the right track, i hope
Jeff Hammel <jhammel@mozilla.com>
parents:
6
diff
changeset
|
137 parser.exit() |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
138 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
139 # get mozilla-central repository directory |
2
3eaee0d10880
make getting mozilla-central slightly less of a hack; soon, we should transition to configuration to make this nice, though lets build the API around it first for now
Jeff Hammel <jhammel@mozilla.com>
parents:
1
diff
changeset
|
140 try_directory = options.mozilla_central |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
141 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
142 # build try syntax |
6
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
143 commit = try_syntax(opt=options.opt, |
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
144 debug=options.debug, |
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
145 unittests=options.unittests, |
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
146 talos=options.talostests |
6f35d0d90c64
move more to configuration land
Jeff Hammel <jhammel@mozilla.com>
parents:
5
diff
changeset
|
147 ) |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
148 print commit |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
149 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
150 # push to try |
14
06b8783eae81
move another check to validate
Jeff Hammel <jhammel@mozilla.com>
parents:
13
diff
changeset
|
151 push_to_try(patches=args, repo=options.mozilla_central, commit=commit) |
0
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
152 |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
153 if __name__ == '__main__': |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
154 main() |
df6a8049e9a4
initial port from http://k0s.org/mozilla/try.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
155 |