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

Side by Side Diff: git_cl_hooks.py

Issue 504002: --replace-all so we don't accum variables with git watchlist use (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import re 6 import re
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 9
10 import breakpad 10 import breakpad
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 commit = (hook_name == 'pre-cl-dcommit') 51 commit = (hook_name == 'pre-cl-dcommit')
52 52
53 # Create our options based on the command-line args and the current checkout. 53 # Create our options based on the command-line args and the current checkout.
54 options = ChangeOptions(commit=commit, upstream_branch=upstream_branch) 54 options = ChangeOptions(commit=commit, upstream_branch=upstream_branch)
55 55
56 # Apply watchlists on upload. 56 # Apply watchlists on upload.
57 if not commit: 57 if not commit:
58 watchlist = watchlists.Watchlists(options.change.RepositoryRoot()) 58 watchlist = watchlists.Watchlists(options.change.RepositoryRoot())
59 files = [f.LocalPath() for f in options.change.AffectedFiles()] 59 files = [f.LocalPath() for f in options.change.AffectedFiles()]
60 watchers = watchlist.GetWatchersForPaths(files) 60 watchers = watchlist.GetWatchersForPaths(files)
61 Backquote(['git', 'config', '--add', 61 Backquote(['git', 'config', '--replace-all',
62 'rietveld.extracc', ','.join(watchers)]) 62 'rietveld.extracc', ','.join(watchers)])
63 63
64 # Run the presubmit checks. 64 # Run the presubmit checks.
65 if presubmit_support.DoPresubmitChecks(options.change, 65 if presubmit_support.DoPresubmitChecks(options.change,
66 options.commit, 66 options.commit,
67 options.verbose, 67 options.verbose,
68 sys.stdout, 68 sys.stdout,
69 sys.stdin, 69 sys.stdin,
70 options.default_presubmit, 70 options.default_presubmit,
71 options.may_prompt): 71 options.may_prompt):
72 sys.exit(0) 72 sys.exit(0)
73 else: 73 else:
74 sys.exit(1) 74 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698