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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 args += ["-aF", Quoted(file_name)] | 224 args += ["-aF", Quoted(file_name)] |
225 if message: | 225 if message: |
226 args += ["-am", Quoted(message)] | 226 args += ["-am", Quoted(message)] |
227 if author: | 227 if author: |
228 args += ["--author", "\"%s <%s>\"" % (author, author)] | 228 args += ["--author", "\"%s <%s>\"" % (author, author)] |
229 self.Git(MakeArgs(args), **kwargs) | 229 self.Git(MakeArgs(args), **kwargs) |
230 | 230 |
231 def GitPresubmit(self, **kwargs): | 231 def GitPresubmit(self, **kwargs): |
232 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"", **kwargs) | 232 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"", **kwargs) |
233 | 233 |
234 def GitDCommit(self, **kwargs): | |
235 self.Git( | |
236 "cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None, **kwargs) | |
237 | |
238 def GitCLLand(self, **kwargs): | 234 def GitCLLand(self, **kwargs): |
239 self.Git( | 235 self.Git( |
240 "cl land -f --bypass-hooks", retry_on=lambda x: x is None, **kwargs) | 236 "cl land -f --bypass-hooks", retry_on=lambda x: x is None, **kwargs) |
241 | 237 |
242 def GitDiff(self, loc1, loc2, **kwargs): | 238 def GitDiff(self, loc1, loc2, **kwargs): |
243 return self.Git(MakeArgs(["diff", loc1, loc2]), **kwargs) | 239 return self.Git(MakeArgs(["diff", loc1, loc2]), **kwargs) |
244 | 240 |
245 def GitPull(self, **kwargs): | 241 def GitPull(self, **kwargs): |
246 self.Git("pull", **kwargs) | 242 self.Git("pull", **kwargs) |
247 | 243 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return match.group(2) | 277 return match.group(2) |
282 | 278 |
283 # Extract the svn revision from 'git-svn' metadata | 279 # Extract the svn revision from 'git-svn' metadata |
284 value = footer_map.get(GIT_SVN_ID_FOOTER_KEY) | 280 value = footer_map.get(GIT_SVN_ID_FOOTER_KEY) |
285 if value: | 281 if value: |
286 match = GIT_SVN_ID_RE.match(value) | 282 match = GIT_SVN_ID_RE.match(value) |
287 if match: | 283 if match: |
288 return match.group(1) | 284 return match.group(1) |
289 raise GitFailedException("Couldn't determine commit position for %s" % | 285 raise GitFailedException("Couldn't determine commit position for %s" % |
290 git_hash) | 286 git_hash) |
OLD | NEW |