Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: tools/push-to-trunk/common_includes.py

Issue 873213002: Clean up release scripts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 print "> ", 582 print "> ",
583 answer = self.ReadLine() 583 answer = self.ReadLine()
584 584
585 # Takes a file containing the patch to apply as first argument. 585 # Takes a file containing the patch to apply as first argument.
586 def ApplyPatch(self, patch_file, revert=False): 586 def ApplyPatch(self, patch_file, revert=False):
587 try: 587 try:
588 self.GitApplyPatch(patch_file, revert) 588 self.GitApplyPatch(patch_file, revert)
589 except GitFailedException: 589 except GitFailedException:
590 self.WaitForResolvingConflicts(patch_file) 590 self.WaitForResolvingConflicts(patch_file)
591 591
592 def FindLastTrunkPush( 592 def FindLastCandidatesPush(
593 self, parent_hash="", branch="", include_patches=False): 593 self, parent_hash="", branch="", include_patches=False):
594 push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*" 594 push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*"
595 if not include_patches: 595 if not include_patches:
596 # Non-patched versions only have three numbers followed by the "(based 596 # Non-patched versions only have three numbers followed by the "(based
597 # on...) comment." 597 # on...) comment."
598 push_pattern += " (based" 598 push_pattern += " (based"
599 branch = "" if parent_hash else branch or self.vc.RemoteCandidateBranch() 599 branch = "" if parent_hash else branch or self.vc.RemoteCandidateBranch()
600 return self.GitLog(n=1, format="%H", grep=push_pattern, 600 return self.GitLog(n=1, format="%H", grep=push_pattern,
601 parent_hash=parent_hash, branch=branch) 601 parent_hash=parent_hash, branch=branch)
602 602
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 for (number, step_class) in enumerate([BootstrapStep] + step_classes): 804 for (number, step_class) in enumerate([BootstrapStep] + step_classes):
805 steps.append(MakeStep(step_class, number, self._state, self._config, 805 steps.append(MakeStep(step_class, number, self._state, self._config,
806 options, self._side_effect_handler)) 806 options, self._side_effect_handler))
807 for step in steps[options.step:]: 807 for step in steps[options.step:]:
808 if step.Run(): 808 if step.Run():
809 return 0 809 return 0
810 return 0 810 return 0
811 811
812 def Run(self, args=None): 812 def Run(self, args=None):
813 return self.RunSteps(self._Steps(), args) 813 return self.RunSteps(self._Steps(), args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698