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

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

Issue 223863003: Make auto-roll script also roll patched trunk revisions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/chromium_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 print "> ", 435 print "> ",
436 answer = self.ReadLine() 436 answer = self.ReadLine()
437 437
438 # Takes a file containing the patch to apply as first argument. 438 # Takes a file containing the patch to apply as first argument.
439 def ApplyPatch(self, patch_file, revert=False): 439 def ApplyPatch(self, patch_file, revert=False):
440 try: 440 try:
441 self.GitApplyPatch(patch_file, revert) 441 self.GitApplyPatch(patch_file, revert)
442 except GitFailedException: 442 except GitFailedException:
443 self.WaitForResolvingConflicts(patch_file) 443 self.WaitForResolvingConflicts(patch_file)
444 444
445 def FindLastTrunkPush(self, parent_hash=""): 445 def FindLastTrunkPush(self, parent_hash="", include_patches=False):
446 push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based" 446 push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*"
447 if not include_patches:
448 # Non-patched versions only have three numbers followed by the "(based
449 # on...) comment."
450 push_pattern += " (based"
447 branch = "" if parent_hash else "svn/trunk" 451 branch = "" if parent_hash else "svn/trunk"
448 return self.GitLog(n=1, format="%H", grep=push_pattern, 452 return self.GitLog(n=1, format="%H", grep=push_pattern,
449 parent_hash=parent_hash, branch=branch) 453 parent_hash=parent_hash, branch=branch)
450 454
451 455
452 class UploadStep(Step): 456 class UploadStep(Step):
453 MESSAGE = "Upload for code review." 457 MESSAGE = "Upload for code review."
454 458
455 def RunStep(self): 459 def RunStep(self):
456 if self._options.reviewer: 460 if self._options.reviewer:
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 for (number, step_class) in enumerate(step_classes): 559 for (number, step_class) in enumerate(step_classes):
556 steps.append(MakeStep(step_class, number, self._state, self._config, 560 steps.append(MakeStep(step_class, number, self._state, self._config,
557 options, self._side_effect_handler)) 561 options, self._side_effect_handler))
558 for step in steps[options.step:]: 562 for step in steps[options.step:]:
559 if step.Run(): 563 if step.Run():
560 return 1 564 return 1
561 return 0 565 return 0
562 566
563 def Run(self, args=None): 567 def Run(self, args=None):
564 return self.RunSteps(self._Steps(), args) 568 return self.RunSteps(self._Steps(), args)
OLDNEW
« no previous file with comments | « tools/push-to-trunk/chromium_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698