Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: tools/push-to-trunk/git_recipes.py

Issue 196473012: Reland "Maintain change log file directly on trunk branch in push-to-trunk." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/push-to-trunk/push_to_trunk.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 self.Git(MakeArgs(["checkout -b", name, branch])) 56 self.Git(MakeArgs(["checkout -b", name, branch]))
57 57
58 def GitDeleteBranch(self, name): 58 def GitDeleteBranch(self, name):
59 assert name 59 assert name
60 self.Git(MakeArgs(["branch -D", name])) 60 self.Git(MakeArgs(["branch -D", name]))
61 61
62 def GitCheckout(self, name): 62 def GitCheckout(self, name):
63 assert name 63 assert name
64 self.Git(MakeArgs(["checkout -f", name])) 64 self.Git(MakeArgs(["checkout -f", name]))
65 65
66 def GitCheckoutFile(self, name):
67 assert name
68 self.Git(MakeArgs(["checkout --", name]))
69
66 @Strip 70 @Strip
67 def GitCurrentBranch(self): 71 def GitCurrentBranch(self):
68 for line in self.Git("status -s -b -uno").strip().splitlines(): 72 for line in self.Git("status -s -b -uno").strip().splitlines():
69 match = re.match(r"^## (.+)", line) 73 match = re.match(r"^## (.+)", line)
70 if match: return match.group(1) 74 if match: return match.group(1)
71 raise Exception("Couldn't find curent branch.") # pragma: no cover 75 raise Exception("Couldn't find curent branch.") # pragma: no cover
72 76
73 @Strip 77 @Strip
74 def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="", 78 def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="",
75 branch="", reverse=False): 79 branch="", reverse=False):
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 @Strip 158 @Strip
155 def GitSVNFindSVNRev(self, git_hash, branch=""): 159 def GitSVNFindSVNRev(self, git_hash, branch=""):
156 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) 160 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]))
157 161
158 def GitSVNDCommit(self): 162 def GitSVNDCommit(self):
159 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) 163 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None)
160 164
161 def GitSVNTag(self, version): 165 def GitSVNTag(self, version):
162 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), 166 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)),
163 retry_on=lambda x: x is None) 167 retry_on=lambda x: x is None)
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/push_to_trunk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698