Mercurial > mozilla > hg > MozillaTry
comparison mozillatry.py @ 36:3a7e8aa80328
move this to an instance method for consumption
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 08 Jan 2013 14:30:13 -0800 |
parents | 61d2bb7a3ca0 |
children | cbf6ec238952 |
comparison
equal
deleted
inserted
replaced
35:61d2bb7a3ca0 | 36:3a7e8aa80328 |
---|---|
172 # ignore options that we don't care about | 172 # ignore options that we don't care about |
173 config = dict([(key, value) for key, value in config.items() | 173 config = dict([(key, value) for key, value in config.items() |
174 if key in self.option_dict]) | 174 if key in self.option_dict]) |
175 return config | 175 return config |
176 | 176 |
177 ### methods for try on mozilla-central | |
178 | |
179 def try_syntax(self): | |
180 return try_syntax(opt=self.config.get('opt'), | |
181 debug=self.config.get('debug'), | |
182 unittests=self.config.get('unittests', []), | |
183 talos=self.config.get('talostests', []), | |
184 bug=self.config.get('bug')) | |
185 | |
177 def main(args=sys.argv[1:]): | 186 def main(args=sys.argv[1:]): |
178 | 187 |
179 # parse command line arguments | 188 # parse command line arguments |
180 parser = MozillaTryConfiguration() | 189 mozillatry = MozillaTryConfiguration() |
181 options, args = parser.parse_args() | 190 options, args = mozillatry.parse_args() |
182 if not args: | 191 if not args: |
183 parser.print_usage() | 192 mozillatry.print_usage() |
184 parser.exit() | 193 mozillatry.exit() |
185 | 194 |
186 # get mozilla-central repository directory | 195 # get mozilla-central repository directory |
187 try_directory = options.mozilla_central | 196 try_directory = options.mozilla_central |
188 | 197 |
189 # build try syntax | 198 # build try syntax |
190 commit = try_syntax(opt=options.opt, | 199 commit = mozillatry.try_syntax() |
191 debug=options.debug, | |
192 unittests=options.unittests, | |
193 talos=options.talostests, | |
194 bug=options.bug | |
195 ) | |
196 print commit | 200 print commit |
197 | 201 |
198 # push to try | 202 # push to try |
199 push_to_try(patches=args, repo=options.mozilla_central, commit=commit) | 203 push_to_try(patches=args, repo=options.mozilla_central, commit=commit) |
200 | 204 |