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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 print "That was not 'RESOLVED' or 'ABORT'." | 453 print "That was not 'RESOLVED' or 'ABORT'." |
454 print "> ", | 454 print "> ", |
455 answer = self.ReadLine() | 455 answer = self.ReadLine() |
456 | 456 |
457 # Takes a file containing the patch to apply as first argument. | 457 # Takes a file containing the patch to apply as first argument. |
458 def ApplyPatch(self, patch_file, reverse_patch=""): | 458 def ApplyPatch(self, patch_file, reverse_patch=""): |
459 args = "apply --index --reject %s \"%s\"" % (reverse_patch, patch_file) | 459 args = "apply --index --reject %s \"%s\"" % (reverse_patch, patch_file) |
460 if self.Git(args) is None: | 460 if self.Git(args) is None: |
461 self.WaitForResolvingConflicts(patch_file) | 461 self.WaitForResolvingConflicts(patch_file) |
462 | 462 |
| 463 def FindLastTrunkPush(self): |
| 464 push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based" |
| 465 args = "log -1 --format=%%H --grep=\"%s\" svn/trunk" % push_pattern |
| 466 return self.Git(args).strip() |
| 467 |
463 | 468 |
464 class UploadStep(Step): | 469 class UploadStep(Step): |
465 MESSAGE = "Upload for code review." | 470 MESSAGE = "Upload for code review." |
466 | 471 |
467 def RunStep(self): | 472 def RunStep(self): |
468 if self._options.reviewer: | 473 if self._options.reviewer: |
469 print "Using account %s for review." % self._options.reviewer | 474 print "Using account %s for review." % self._options.reviewer |
470 reviewer = self._options.reviewer | 475 reviewer = self._options.reviewer |
471 else: | 476 else: |
472 print "Please enter the email address of a V8 reviewer for your patch: ", | 477 print "Please enter the email address of a V8 reviewer for your patch: ", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 if options.s == 0 and os.path.exists(state_file): | 516 if options.s == 0 and os.path.exists(state_file): |
512 os.remove(state_file) | 517 os.remove(state_file) |
513 state = {} | 518 state = {} |
514 steps = [] | 519 steps = [] |
515 for (number, step_class) in enumerate(step_classes): | 520 for (number, step_class) in enumerate(step_classes): |
516 steps.append(MakeStep(step_class, number, state, config, | 521 steps.append(MakeStep(step_class, number, state, config, |
517 options, side_effect_handler)) | 522 options, side_effect_handler)) |
518 | 523 |
519 for step in steps[options.s:]: | 524 for step in steps[options.s:]: |
520 step.Run() | 525 step.Run() |
OLD | NEW |