Commit 3db87198 authored by jrg@chromium.org's avatar jrg@chromium.org
parent 7aca9e8c
......@@ -11,6 +11,7 @@ import breakpad
import presubmit_support
import scm
import watchlists
def Backquote(cmd, cwd=None):
"""Like running `cmd` in a shell script."""
......@@ -52,6 +53,14 @@ def RunHooks(hook_name, upstream_branch):
# Create our options based on the command-line args and the current checkout.
options = ChangeOptions(commit=commit, upstream_branch=upstream_branch)
# Apply watchlists on upload.
if not commit:
watchlist = watchlists.Watchlists(options.change.RepositoryRoot())
files = [f.LocalPath() for f in options.change.AffectedFiles()]
watchers = watchlist.GetWatchersForPaths(files)
Backquote(['git', 'config', '--add',
'rietveld.extra_cc', ','.join(watchers)])
# Run the presubmit checks.
if presubmit_support.DoPresubmitChecks(options.change,
options.commit,
......
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