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

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

Issue 197023004: Add file exclusion to trunk patch creation 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/test_scripts.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 args += ["-aF", Quoted(file_name)] 125 args += ["-aF", Quoted(file_name)]
126 if message: 126 if message:
127 args += ["-am", Quoted(message)] 127 args += ["-am", Quoted(message)]
128 self.Git(MakeArgs(args)) 128 self.Git(MakeArgs(args))
129 129
130 def GitPresubmit(self): 130 def GitPresubmit(self):
131 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"") 131 self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"")
132 132
133 def GitDCommit(self): 133 def GitDCommit(self):
134 self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None) 134 self.Git("cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None)
135 135
Michael Achenbach 2014/03/12 15:35:06 I hope this approach has no potential for omitting
136 def GitDiff(self, loc1, loc2): 136 def GitDiff(self, loc1, loc2, exclude=None):
137 return self.Git(MakeArgs(["diff", loc1, loc2])) 137 exclude = exclude or []
138 files = self.Git(MakeArgs(["diff", "--name-only", loc1, loc2]))
139 files = filter(lambda f: f not in exclude, files.strip().splitlines())
140 return self.Git(MakeArgs(["diff", loc1, loc2] + files))
138 141
139 def GitPull(self): 142 def GitPull(self):
140 self.Git("pull") 143 self.Git("pull")
141 144
142 def GitSVNFetch(self): 145 def GitSVNFetch(self):
143 self.Git("svn fetch") 146 self.Git("svn fetch")
144 147
145 @Strip 148 @Strip
146 def GitSVNLog(self): 149 def GitSVNLog(self):
147 return self.Git("svn log -1 --oneline") 150 return self.Git("svn log -1 --oneline")
148 151
149 @Strip 152 @Strip
150 def GitSVNFindGitHash(self, revision, branch=""): 153 def GitSVNFindGitHash(self, revision, branch=""):
151 assert revision 154 assert revision
152 return self.Git(MakeArgs(["svn find-rev", "r%s" % revision, branch])) 155 return self.Git(MakeArgs(["svn find-rev", "r%s" % revision, branch]))
153 156
154 @Strip 157 @Strip
155 def GitSVNFindSVNRev(self, git_hash, branch=""): 158 def GitSVNFindSVNRev(self, git_hash, branch=""):
156 return self.Git(MakeArgs(["svn find-rev", git_hash, branch])) 159 return self.Git(MakeArgs(["svn find-rev", git_hash, branch]))
157 160
158 def GitSVNDCommit(self): 161 def GitSVNDCommit(self):
159 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None) 162 return self.Git("svn dcommit 2>&1", retry_on=lambda x: x is None)
160 163
161 def GitSVNTag(self, version): 164 def GitSVNTag(self, version):
162 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)), 165 self.Git(("svn tag %s -m \"Tagging version %s\"" % (version, version)),
163 retry_on=lambda x: x is None) 166 retry_on=lambda x: x is None)
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698