| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 self.Git("svn rebase", **kwargs) | 288 self.Git("svn rebase", **kwargs) |
| 289 | 289 |
| 290 # TODO(machenbach): Unused? Remove. | 290 # TODO(machenbach): Unused? Remove. |
| 291 @Strip | 291 @Strip |
| 292 def GitSVNLog(self, **kwargs): | 292 def GitSVNLog(self, **kwargs): |
| 293 return self.Git("svn log -1 --oneline", **kwargs) | 293 return self.Git("svn log -1 --oneline", **kwargs) |
| 294 | 294 |
| 295 @Strip | 295 @Strip |
| 296 def GitSVNFindGitHash(self, revision, branch="", **kwargs): | 296 def GitSVNFindGitHash(self, revision, branch="", **kwargs): |
| 297 assert revision | 297 assert revision |
| 298 return self.Git( | 298 args = MakeArgs(["svn find-rev", "r%s" % revision, branch]) |
| 299 MakeArgs(["svn find-rev", "r%s" % revision, branch]), **kwargs) | 299 |
| 300 # Pick the last line if multiple lines are available. The first lines might |
| 301 # print information about rebuilding the svn-git mapping. |
| 302 return self.Git(args, **kwargs).splitlines()[-1] |
| 300 | 303 |
| 301 @Strip | 304 @Strip |
| 302 def GitSVNFindSVNRev(self, git_hash, branch="", **kwargs): | 305 def GitSVNFindSVNRev(self, git_hash, branch="", **kwargs): |
| 303 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]), **kwargs) | 306 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]), **kwargs) |
| 304 | 307 |
| 305 def GitSVNDCommit(self, **kwargs): | 308 def GitSVNDCommit(self, **kwargs): |
| 306 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None, **kwargs) | 309 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None, **kwargs) |
| 307 | 310 |
| 308 def GitSVNTag(self, version, **kwargs): | 311 def GitSVNTag(self, version, **kwargs): |
| 309 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 312 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
| 310 retry_on=lambda x: x is None, | 313 retry_on=lambda x: x is None, |
| 311 **kwargs) | 314 **kwargs) |
| OLD | NEW |