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

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

Issue 181603002: Fix patch creation in merge-to-branch script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/git_recipes.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 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE)) 175 TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE))
176 176
177 177
178 class ApplyPatches(Step): 178 class ApplyPatches(Step):
179 MESSAGE = "Apply patches for selected revisions." 179 MESSAGE = "Apply patches for selected revisions."
180 180
181 def RunStep(self): 181 def RunStep(self):
182 for commit_hash in self["patch_commit_hashes"]: 182 for commit_hash in self["patch_commit_hashes"]:
183 print("Applying patch for %s to %s..." 183 print("Applying patch for %s to %s..."
184 % (commit_hash, self["merge_to_branch"])) 184 % (commit_hash, self["merge_to_branch"]))
185 patch = self.GitLog(n=1, patch=True, git_hash=commit_hash) 185 patch = self.GitGetPatch(commit_hash)
186 TextToFile(patch, self.Config(TEMPORARY_PATCH_FILE)) 186 TextToFile(patch, self.Config(TEMPORARY_PATCH_FILE))
187 self.ApplyPatch(self.Config(TEMPORARY_PATCH_FILE), self._options.revert) 187 self.ApplyPatch(self.Config(TEMPORARY_PATCH_FILE), self._options.revert)
188 if self._options.patch: 188 if self._options.patch:
189 self.ApplyPatch(self._options.patch, self._options.revert) 189 self.ApplyPatch(self._options.patch, self._options.revert)
190 190
191 191
192 class PrepareVersion(Step): 192 class PrepareVersion(Step):
193 MESSAGE = "Prepare version file." 193 MESSAGE = "Prepare version file."
194 194
195 def RunStep(self): 195 def RunStep(self):
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 def Main(): 354 def Main():
355 parser = BuildOptions() 355 parser = BuildOptions()
356 options = parser.parse_args() 356 options = parser.parse_args()
357 if not ProcessOptions(options): 357 if not ProcessOptions(options):
358 parser.print_help() 358 parser.print_help()
359 return 1 359 return 1
360 RunMergeToBranch(CONFIG, MergeToBranchOptions(options)) 360 RunMergeToBranch(CONFIG, MergeToBranchOptions(options))
361 361
362 if __name__ == "__main__": 362 if __name__ == "__main__":
363 sys.exit(Main()) 363 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/push-to-trunk/git_recipes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698