Commit b65c43c6 authored by brettw@chromium.org's avatar brettw@chromium.org

Add the option to bypass watchlists.

I have a large rename change and it's impossible to upload because the size of the CC field is above the maximum 2000 characters in Reitveld.

Review URL: https://chromiumcodereview.appspot.com/16366008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205323 0039d316-1c4b-4281-b951-d872f2087c98
parent d69dab94
......@@ -1344,6 +1344,9 @@ def CMDupload(parser, args):
"""upload the current changelist to codereview"""
parser.add_option('--bypass-hooks', action='store_true', dest='bypass_hooks',
help='bypass upload presubmit hook')
parser.add_option('--bypass-watchlists', action='store_true',
dest='bypass_watchlists',
help='bypass watchlists auto CC-ing reviewers')
parser.add_option('-f', action='store_true', dest='force',
help="force yes to questions (don't prompt)")
parser.add_option('-m', dest='message', help='message for patchset')
......@@ -1391,7 +1394,8 @@ def CMDupload(parser, args):
change = cl.GetChange(base_branch, None)
watchlist = watchlists.Watchlists(change.RepositoryRoot())
files = [f.LocalPath() for f in change.AffectedFiles()]
cl.SetWatchers(watchlist.GetWatchersForPaths(files))
if not options.bypass_watchlists:
cl.SetWatchers(watchlist.GetWatchersForPaths(files))
if not options.bypass_hooks:
hook_results = cl.RunHook(committing=False,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment