| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 if force: | 160 if force: |
| 161 args.append("-f") | 161 args.append("-f") |
| 162 if cq: | 162 if cq: |
| 163 args.append("--use-commit-queue") | 163 args.append("--use-commit-queue") |
| 164 if bypass_hooks: | 164 if bypass_hooks: |
| 165 args.append("--bypass-hooks") | 165 args.append("--bypass-hooks") |
| 166 # TODO(machenbach): Check output in forced mode. Verify that all required | 166 # TODO(machenbach): Check output in forced mode. Verify that all required |
| 167 # base files were uploaded, if not retry. | 167 # base files were uploaded, if not retry. |
| 168 self.Git(MakeArgs(args), pipe=False) | 168 self.Git(MakeArgs(args), pipe=False) |
| 169 | 169 |
| 170 def GitCommit(self, message="", file_name=""): | 170 def GitCommit(self, message="", file_name="", author=None): |
| 171 assert message or file_name | 171 assert message or file_name |
| 172 args = ["commit"] | 172 args = ["commit"] |
| 173 if file_name: | 173 if file_name: |
| 174 args += ["-aF", Quoted(file_name)] | 174 args += ["-aF", Quoted(file_name)] |
| 175 if message: | 175 if message: |
| 176 args += ["-am", Quoted(message)] | 176 args += ["-am", Quoted(message)] |
| 177 if author: |
| 178 args += ["--author", "\"%s <%s>\"" % (author, author)] |
| 177 self.Git(MakeArgs(args)) | 179 self.Git(MakeArgs(args)) |
| 178 | 180 |
| 179 def GitPresubmit(self): | 181 def GitPresubmit(self): |
| 180 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") | 182 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") |
| 181 | 183 |
| 182 def GitDCommit(self): | 184 def GitDCommit(self): |
| 183 self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None) | 185 self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None) |
| 184 | 186 |
| 185 def GitDiff(self, loc1, loc2): | 187 def GitDiff(self, loc1, loc2): |
| 186 return self.Git(MakeArgs(["diff", loc1, loc2])) | 188 return self.Git(MakeArgs(["diff", loc1, loc2])) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 @Strip | 223 @Strip |
| 222 def GitSVNFindSVNRev(self, git_hash, branch=""): | 224 def GitSVNFindSVNRev(self, git_hash, branch=""): |
| 223 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) | 225 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) |
| 224 | 226 |
| 225 def GitSVNDCommit(self): | 227 def GitSVNDCommit(self): |
| 226 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) | 228 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) |
| 227 | 229 |
| 228 def GitSVNTag(self, version): | 230 def GitSVNTag(self, version): |
| 229 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 231 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
| 230 retry_on=lambda x: x is None) | 232 retry_on=lambda x: x is None) |
| OLD | NEW |