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

Unified Diff: apply_issue.py

Issue 264823003: Add black/whitelisting to apply_issue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | checkout.py » ('j') | checkout.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apply_issue.py
diff --git a/apply_issue.py b/apply_issue.py
index 75ea60918d88e4a04de0bab9b75ebdf3504b9c0b..46f15046d11fc54c813c80ed182892a3ed6b327a 100755
--- a/apply_issue.py
+++ b/apply_issue.py
@@ -87,10 +87,17 @@ def main():
'is detected.')
parser.add_option('-b', '--base_ref', help='Base git ref to patch on top of, '
'used for verification.')
+ parser.add_option('--whitelist', action='append',
M-A Ruel 2014/05/06 18:49:08 I recommend using default=[] on both, otherwise op
Ryan Tseng 2014/05/06 19:31:53 Done.
+ help='Patch only specified file(s).')
+ parser.add_option('--blacklist', action='append',
+ help='Don\'t patch specified file(s).')
parser.add_option('-d', '--ignore_deps', action='store_true',
help='Don\'t run gclient sync on DEPS changes.')
options, args = parser.parse_args()
+ if options.whitelist and options.blacklist:
+ parser.error('Cannot specify both --whitelist and --blacklist')
+
if options.password and options.private_key_file:
parser.error('-k and -w options are incompatible')
if options.email and options.email_file:
@@ -213,7 +220,9 @@ def main():
scm_obj.apply_patch(
patchset, verbose=True,
email=properties.get('owner_email', 'chrome-bot@chromium.org'),
- name=properties.get('owner', 'chrome-bot'))
+ name=properties.get('owner', 'chrome-bot'),
+ whitelist=options.whitelist,
+ blacklist=options.blacklist)
except checkout.PatchApplicationFailed, e:
print(str(e))
print('CWD=%s' % os.getcwd())
« no previous file with comments | « no previous file | checkout.py » ('j') | checkout.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698