From b718983da524ae48fe16c03da248b68f37f73652 Mon Sep 17 00:00:00 2001 From: "msb@chromium.org" Date: Thu, 7 Oct 2010 23:45:10 +0000 Subject: [PATCH] Revert "git_cl_hooks: get cl fields vi git_cl accessors instead of using backquote" TBR=maruel BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@61883 0039d316-1c4b-4281-b951-d872f2087c98 --- git_cl_hooks.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/git_cl_hooks.py b/git_cl_hooks.py index 4202502c6..059f52e26 100644 --- a/git_cl_hooks.py +++ b/git_cl_hooks.py @@ -9,16 +9,10 @@ import sys import breakpad -from git_cl_repo import git_cl -from git_cl_repo import upload - import presubmit_support import scm import watchlists -# Really ugly hack to quiet upload.py -upload.verbosity = 0 - def Backquote(cmd, cwd=None): """Like running `cmd` in a shell script.""" return subprocess.Popen(cmd, @@ -49,11 +43,10 @@ class ChangeOptions: # We use the sha1 of HEAD as a name of this change. name = Backquote(['git', 'rev-parse', 'HEAD']) files = scm.GIT.CaptureStatus([root], upstream_branch) - cl = git_cl.Changelist() - issue = cl.GetIssue() - patchset = cl.GetPatchset() + issue = BackquoteAsInteger(['git', 'cl', 'status', '--field=id']) + patchset = BackquoteAsInteger(['git', 'cl', 'status', '--field=patch']) if issue: - description = cl.GetDescription() + description = Backquote(['git', 'cl', 'status', '--field=desc']) else: # If the change was never uploaded, use the log messages of all commits # up to the branch point, as git cl upload will prefill the description