| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 @Strip | 78 @Strip |
| 79 def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="", | 79 def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="", |
| 80 branch="", reverse=False): | 80 branch="", reverse=False): |
| 81 assert not (git_hash and parent_hash) | 81 assert not (git_hash and parent_hash) |
| 82 args = ["log"] | 82 args = ["log"] |
| 83 if n > 0: | 83 if n > 0: |
| 84 args.append("-%d" % n) | 84 args.append("-%d" % n) |
| 85 if format: | 85 if format: |
| 86 args.append("--format=%s" % format) | 86 args.append("--format=%s" % format) |
| 87 if grep: | 87 if grep: |
| 88 args.append("--grep=\"%s\"" % grep) | 88 args.append("--grep=\"%s\"" % grep.replace("\"", "\\\"")) |
| 89 if reverse: | 89 if reverse: |
| 90 args.append("--reverse") | 90 args.append("--reverse") |
| 91 if git_hash: | 91 if git_hash: |
| 92 args.append(git_hash) | 92 args.append(git_hash) |
| 93 if parent_hash: | 93 if parent_hash: |
| 94 args.append("%s^" % parent_hash) | 94 args.append("%s^" % parent_hash) |
| 95 args.append(branch) | 95 args.append(branch) |
| 96 return self.Git(MakeArgs(args)) | 96 return self.Git(MakeArgs(args)) |
| 97 | 97 |
| 98 def GitGetPatch(self, git_hash): | 98 def GitGetPatch(self, git_hash): |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 @Strip | 159 @Strip |
| 160 def GitSVNFindSVNRev(self, git_hash, branch=""): | 160 def GitSVNFindSVNRev(self, git_hash, branch=""): |
| 161 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) | 161 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) |
| 162 | 162 |
| 163 def GitSVNDCommit(self): | 163 def GitSVNDCommit(self): |
| 164 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) | 164 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) |
| 165 | 165 |
| 166 def GitSVNTag(self, version): | 166 def GitSVNTag(self, version): |
| 167 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 167 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
| 168 retry_on=lambda x: x is None) | 168 retry_on=lambda x: x is None) |
| OLD | NEW |