OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 the V8 project authors. All rights reserved. | 2 # Copyright 2013 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 280 |
281 def RemoteMasterBranch(self): | 281 def RemoteMasterBranch(self): |
282 raise NotImplementedError() | 282 raise NotImplementedError() |
283 | 283 |
284 def RemoteCandidateBranch(self): | 284 def RemoteCandidateBranch(self): |
285 raise NotImplementedError() | 285 raise NotImplementedError() |
286 | 286 |
287 def RemoteBranch(self, name): | 287 def RemoteBranch(self, name): |
288 raise NotImplementedError() | 288 raise NotImplementedError() |
289 | 289 |
290 def Land(self): | |
291 raise NotImplementedError() | |
292 | |
293 def CLLand(self): | 290 def CLLand(self): |
294 raise NotImplementedError() | 291 raise NotImplementedError() |
295 | 292 |
296 def Tag(self, tag, remote, message): | 293 def Tag(self, tag, remote, message): |
297 """Sets a tag for the current commit. | 294 """Sets a tag for the current commit. |
298 | 295 |
299 Assumptions: The commit already landed and the commit message is unique. | 296 Assumptions: The commit already landed and the commit message is unique. |
300 """ | 297 """ |
301 raise NotImplementedError() | 298 raise NotImplementedError() |
302 | 299 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 print("The commit has not replicated to git. Waiting for %s seconds." % | 346 print("The commit has not replicated to git. Waiting for %s seconds." % |
350 wait_interval) | 347 wait_interval) |
351 self.step._side_effect_handler.Sleep(wait_interval) | 348 self.step._side_effect_handler.Sleep(wait_interval) |
352 else: | 349 else: |
353 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " | 350 self.step.Die("Couldn't determine commit for setting the tag. Maybe the " |
354 "git updater is lagging behind?") | 351 "git updater is lagging behind?") |
355 | 352 |
356 self.step.Git("tag %s %s" % (tag, commit)) | 353 self.step.Git("tag %s %s" % (tag, commit)) |
357 self.step.Git("push origin %s" % tag) | 354 self.step.Git("push origin %s" % tag) |
358 | 355 |
359 def Land(self): | |
360 self.step.Git("push origin") | |
361 | |
362 def CLLand(self): | 356 def CLLand(self): |
363 self.step.GitCLLand() | 357 self.step.GitCLLand() |
364 | 358 |
365 | 359 |
366 class Step(GitRecipesMixin): | 360 class Step(GitRecipesMixin): |
367 def __init__(self, text, number, config, state, options, handler): | 361 def __init__(self, text, number, config, state, options, handler): |
368 self._text = text | 362 self._text = text |
369 self._number = number | 363 self._number = number |
370 self._config = config | 364 self._config = config |
371 self._state = state | 365 self._state = state |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
800 for (number, step_class) in enumerate([BootstrapStep] + step_classes): | 794 for (number, step_class) in enumerate([BootstrapStep] + step_classes): |
801 steps.append(MakeStep(step_class, number, self._state, self._config, | 795 steps.append(MakeStep(step_class, number, self._state, self._config, |
802 options, self._side_effect_handler)) | 796 options, self._side_effect_handler)) |
803 for step in steps[options.step:]: | 797 for step in steps[options.step:]: |
804 if step.Run(): | 798 if step.Run(): |
805 return 0 | 799 return 0 |
806 return 0 | 800 return 0 |
807 | 801 |
808 def Run(self, args=None): | 802 def Run(self, args=None): |
809 return self.RunSteps(self._Steps(), args) | 803 return self.RunSteps(self._Steps(), args) |
OLD | NEW |