| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 self.Git(MakeArgs(["add", Quoted(name)])) | 137 self.Git(MakeArgs(["add", Quoted(name)])) |
| 138 | 138 |
| 139 def GitApplyPatch(self, patch_file, reverse=False): | 139 def GitApplyPatch(self, patch_file, reverse=False): |
| 140 assert patch_file | 140 assert patch_file |
| 141 args = ["apply --index --reject"] | 141 args = ["apply --index --reject"] |
| 142 if reverse: | 142 if reverse: |
| 143 args.append("--reverse") | 143 args.append("--reverse") |
| 144 args.append(Quoted(patch_file)) | 144 args.append(Quoted(patch_file)) |
| 145 self.Git(MakeArgs(args)) | 145 self.Git(MakeArgs(args)) |
| 146 | 146 |
| 147 def GitUpload(self, reviewer="", author="", force=False): | 147 def GitUpload(self, reviewer="", author="", force=False, cq=False): |
| 148 args = ["cl upload --send-mail"] | 148 args = ["cl upload --send-mail"] |
| 149 if author: | 149 if author: |
| 150 args += ["--email", Quoted(author)] | 150 args += ["--email", Quoted(author)] |
| 151 if reviewer: | 151 if reviewer: |
| 152 args += ["-r", Quoted(reviewer)] | 152 args += ["-r", Quoted(reviewer)] |
| 153 if force: | 153 if force: |
| 154 args.append("-f") | 154 args.append("-f") |
| 155 if cq: |
| 156 args.append("--use-commit-queue") |
| 155 # TODO(machenbach): Check output in forced mode. Verify that all required | 157 # TODO(machenbach): Check output in forced mode. Verify that all required |
| 156 # base files were uploaded, if not retry. | 158 # base files were uploaded, if not retry. |
| 157 self.Git(MakeArgs(args), pipe=False) | 159 self.Git(MakeArgs(args), pipe=False) |
| 158 | 160 |
| 159 def GitCommit(self, message="", file_name=""): | 161 def GitCommit(self, message="", file_name=""): |
| 160 assert message or file_name | 162 assert message or file_name |
| 161 args = ["commit"] | 163 args = ["commit"] |
| 162 if file_name: | 164 if file_name: |
| 163 args += ["-aF", Quoted(file_name)] | 165 args += ["-aF", Quoted(file_name)] |
| 164 if message: | 166 if message: |
| (...skipping 28 matching lines...) Expand all Loading... |
| 193 @Strip | 195 @Strip |
| 194 def GitSVNFindSVNRev(self, git_hash, branch=""): | 196 def GitSVNFindSVNRev(self, git_hash, branch=""): |
| 195 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) | 197 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) |
| 196 | 198 |
| 197 def GitSVNDCommit(self): | 199 def GitSVNDCommit(self): |
| 198 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) | 200 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) |
| 199 | 201 |
| 200 def GitSVNTag(self, version): | 202 def GitSVNTag(self, version): |
| 201 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 203 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
| 202 retry_on=lambda x: x is None) | 204 retry_on=lambda x: x is None) |
| OLD | NEW |