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

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

Issue 404093002: Fix automatic version update. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/bump_up_version.py ('k') | tools/push-to-trunk/push_to_trunk.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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 self.Git(MakeArgs(["add", Quoted(name)])) 140 self.Git(MakeArgs(["add", Quoted(name)]))
141 141
142 def GitApplyPatch(self, patch_file, reverse=False): 142 def GitApplyPatch(self, patch_file, reverse=False):
143 assert patch_file 143 assert patch_file
144 args = ["apply --index --reject"] 144 args = ["apply --index --reject"]
145 if reverse: 145 if reverse:
146 args.append("--reverse") 146 args.append("--reverse")
147 args.append(Quoted(patch_file)) 147 args.append(Quoted(patch_file))
148 self.Git(MakeArgs(args)) 148 self.Git(MakeArgs(args))
149 149
150 def GitUpload(self, reviewer="", author="", force=False, cq=False): 150 def GitUpload(self, reviewer="", author="", force=False, cq=False,
151 bypass_hooks=False):
151 args = ["cl upload --send-mail"] 152 args = ["cl upload --send-mail"]
152 if author: 153 if author:
153 args += ["--email", Quoted(author)] 154 args += ["--email", Quoted(author)]
154 if reviewer: 155 if reviewer:
155 args += ["-r", Quoted(reviewer)] 156 args += ["-r", Quoted(reviewer)]
156 if force: 157 if force:
157 args.append("-f") 158 args.append("-f")
158 if cq: 159 if cq:
159 args.append("--use-commit-queue") 160 args.append("--use-commit-queue")
161 if bypass_hooks:
162 args.append("--bypass-hooks")
160 # TODO(machenbach): Check output in forced mode. Verify that all required 163 # TODO(machenbach): Check output in forced mode. Verify that all required
161 # base files were uploaded, if not retry. 164 # base files were uploaded, if not retry.
162 self.Git(MakeArgs(args), pipe=False) 165 self.Git(MakeArgs(args), pipe=False)
163 166
164 def GitCommit(self, message="", file_name=""): 167 def GitCommit(self, message="", file_name=""):
165 assert message or file_name 168 assert message or file_name
166 args = ["commit"] 169 args = ["commit"]
167 if file_name: 170 if file_name:
168 args += ["-aF", Quoted(file_name)] 171 args += ["-aF", Quoted(file_name)]
169 if message: 172 if message:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 @Strip 204 @Strip
202 def GitSVNFindSVNRev(self, git_hash, branch=""): 205 def GitSVNFindSVNRev(self, git_hash, branch=""):
203 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) 206 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]))
204 207
205 def GitSVNDCommit(self): 208 def GitSVNDCommit(self):
206 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) 209 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None)
207 210
208 def GitSVNTag(self, version): 211 def GitSVNTag(self, version):
209 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), 212 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)),
210 retry_on=lambda x: x is None) 213 retry_on=lambda x: x is None)
OLDNEW
« no previous file with comments | « tools/push-to-trunk/bump_up_version.py ('k') | tools/push-to-trunk/push_to_trunk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698