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

Unified Diff: git_cl.py

Issue 8059009: Support for |change| argument to |GetPreferredTrySlaves()|, try 2. (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 3 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 | « gcl.py ('k') | git_try.py » ('j') | trychange.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
===================================================================
--- git_cl.py (revision 102922)
+++ git_cl.py (working copy)
@@ -488,8 +488,7 @@
self.SetPatchset(0)
self.has_issue = False
- def RunHook(self, committing, upstream_branch, may_prompt, verbose, author):
- """Calls sys.exit() if the hook fails; returns a HookResults otherwise."""
+ def GetChange(self, upstream_branch, author):
root = RunCommand(['git', 'rev-parse', '--show-cdup']).strip() or '.'
absroot = os.path.abspath(root)
@@ -511,7 +510,7 @@
if not author:
author = RunGit(['config', 'user.email']).strip() or None
- change = presubmit_support.GitChange(
+ return presubmit_support.GitChange(
name,
description,
absroot,
@@ -520,6 +519,10 @@
patchset,
author)
+ def RunHook(self, committing, upstream_branch, may_prompt, verbose, author):
+ """Calls sys.exit() if the hook fails; returns a HookResults otherwise."""
+ change = self.GetChange(upstream_branch, author)
+
# Apply watchlists on upload.
if not committing:
watchlist = watchlists.Watchlists(change.RepositoryRoot())
« no previous file with comments | « gcl.py ('k') | git_try.py » ('j') | trychange.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698