OLD | NEW |
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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 def GitApplyPatch(self, patch_file, reverse=False, **kwargs): | 188 def GitApplyPatch(self, patch_file, reverse=False, **kwargs): |
189 assert patch_file | 189 assert patch_file |
190 args = ["apply --index --reject"] | 190 args = ["apply --index --reject"] |
191 if reverse: | 191 if reverse: |
192 args.append("--reverse") | 192 args.append("--reverse") |
193 args.append(Quoted(patch_file)) | 193 args.append(Quoted(patch_file)) |
194 self.Git(MakeArgs(args), **kwargs) | 194 self.Git(MakeArgs(args), **kwargs) |
195 | 195 |
196 def GitUpload(self, reviewer="", author="", force=False, cq=False, | 196 def GitUpload(self, reviewer="", author="", force=False, cq=False, |
197 bypass_hooks=False, **kwargs): | 197 bypass_hooks=False, cc="", **kwargs): |
198 args = ["cl upload --send-mail"] | 198 args = ["cl upload --send-mail"] |
199 if author: | 199 if author: |
200 args += ["--email", Quoted(author)] | 200 args += ["--email", Quoted(author)] |
201 if reviewer: | 201 if reviewer: |
202 args += ["-r", Quoted(reviewer)] | 202 args += ["-r", Quoted(reviewer)] |
203 if force: | 203 if force: |
204 args.append("-f") | 204 args.append("-f") |
205 if cq: | 205 if cq: |
206 args.append("--use-commit-queue") | 206 args.append("--use-commit-queue") |
207 if bypass_hooks: | 207 if bypass_hooks: |
208 args.append("--bypass-hooks") | 208 args.append("--bypass-hooks") |
| 209 if cc: |
| 210 args += ["-cc", Quoted(cc)] |
209 # TODO(machenbach): Check output in forced mode. Verify that all required | 211 # TODO(machenbach): Check output in forced mode. Verify that all required |
210 # base files were uploaded, if not retry. | 212 # base files were uploaded, if not retry. |
211 self.Git(MakeArgs(args), pipe=False, **kwargs) | 213 self.Git(MakeArgs(args), pipe=False, **kwargs) |
212 | 214 |
213 def GitCommit(self, message="", file_name="", author=None, **kwargs): | 215 def GitCommit(self, message="", file_name="", author=None, **kwargs): |
214 assert message or file_name | 216 assert message or file_name |
215 args = ["commit"] | 217 args = ["commit"] |
216 if file_name: | 218 if file_name: |
217 args += ["-aF", Quoted(file_name)] | 219 args += ["-aF", Quoted(file_name)] |
218 if message: | 220 if message: |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 def GitSVNFindSVNRev(self, git_hash, branch="", **kwargs): | 302 def GitSVNFindSVNRev(self, git_hash, branch="", **kwargs): |
301 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]), **kwargs) | 303 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]), **kwargs) |
302 | 304 |
303 def GitSVNDCommit(self, **kwargs): | 305 def GitSVNDCommit(self, **kwargs): |
304 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None, **kwargs) | 306 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None, **kwargs) |
305 | 307 |
306 def GitSVNTag(self, version, **kwargs): | 308 def GitSVNTag(self, version, **kwargs): |
307 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 309 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
308 retry_on=lambda x: x is None, | 310 retry_on=lambda x: x is None, |
309 **kwargs) | 311 **kwargs) |
OLD | NEW |