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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 self.Git(MakeArgs(["checkout -b", name, branch])) | 61 self.Git(MakeArgs(["checkout -b", name, branch])) |
62 | 62 |
63 def GitDeleteBranch(self, name): | 63 def GitDeleteBranch(self, name): |
64 assert name | 64 assert name |
65 self.Git(MakeArgs(["branch -D", name])) | 65 self.Git(MakeArgs(["branch -D", name])) |
66 | 66 |
67 def GitReset(self, name): | 67 def GitReset(self, name): |
68 assert name | 68 assert name |
69 self.Git(MakeArgs(["reset --hard", name])) | 69 self.Git(MakeArgs(["reset --hard", name])) |
70 | 70 |
| 71 def GitStash(self): |
| 72 self.Git(MakeArgs(["stash"])) |
| 73 |
71 def GitRemotes(self): | 74 def GitRemotes(self): |
72 return map(str.strip, self.Git(MakeArgs(["branch -r"])).splitlines()) | 75 return map(str.strip, self.Git(MakeArgs(["branch -r"])).splitlines()) |
73 | 76 |
74 def GitCheckout(self, name): | 77 def GitCheckout(self, name): |
75 assert name | 78 assert name |
76 self.Git(MakeArgs(["checkout -f", name])) | 79 self.Git(MakeArgs(["checkout -f", name])) |
77 | 80 |
78 def GitCheckoutFile(self, name, branch_or_hash): | 81 def GitCheckoutFile(self, name, branch_or_hash): |
79 assert name | 82 assert name |
80 assert branch_or_hash | 83 assert branch_or_hash |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 @Strip | 198 @Strip |
196 def GitSVNFindSVNRev(self, git_hash, branch=""): | 199 def GitSVNFindSVNRev(self, git_hash, branch=""): |
197 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) | 200 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) |
198 | 201 |
199 def GitSVNDCommit(self): | 202 def GitSVNDCommit(self): |
200 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) | 203 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) |
201 | 204 |
202 def GitSVNTag(self, version): | 205 def GitSVNTag(self, version): |
203 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), | 206 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), |
204 retry_on=lambda x: x is None) | 207 retry_on=lambda x: x is None) |
OLD | NEW |