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

Unified Diff: git_cl.py

Issue 8036046: Revert r102783 "Support for |change| argument to |GetPreferredTrySlaves()|." (Closed) Base URL: svn://svn.chromium.org/chrome/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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index 9946999c639b4bfd50edd3ab5011b9f97e18a400..cb33488e4bbe07e1a5120354f92bdbe363e739e4 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -488,7 +488,8 @@ or verify this branch is set up to track another (via the --track argument to
self.SetPatchset(0)
self.has_issue = False
- def GetChange(self, upstream_branch, author):
+ def RunHook(self, committing, upstream_branch, may_prompt, verbose, author):
+ """Calls sys.exit() if the hook fails; returns a HookResults otherwise."""
root = RunCommand(['git', 'rev-parse', '--show-cdup']).strip() or '.'
absroot = os.path.abspath(root)
@@ -510,7 +511,7 @@ or verify this branch is set up to track another (via the --track argument to
if not author:
author = RunGit(['config', 'user.email']).strip() or None
- return presubmit_support.GitChange(
+ change = presubmit_support.GitChange(
name,
description,
absroot,
@@ -519,10 +520,6 @@ or verify this branch is set up to track another (via the --track argument to
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698