Commit 71a51e8f authored by tedbo@google.com's avatar tedbo@google.com

Fix git cl code to get the changelist description without using gcl.

The git_cl_hooks.py was failing to get the changelist description.
It was using gcl to get the description but this was failing
because gcl was unable to get the cached copy of 
codereview.settings (because it was never set up). In this
case, gcl reverts to the default dictionary which may be 
incorrect in some cases.

This changes to use 'git cl status --field=desc', which
is aware of the codereview.settings.

Review URL: http://codereview.chromium.org/2832006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@49878 0039d316-1c4b-4281-b951-d872f2087c98
parent b1901a6e
......@@ -9,7 +9,6 @@ import sys
import breakpad
import gcl
import presubmit_support
import scm
import watchlists
......@@ -51,7 +50,7 @@ class ChangeOptions:
issue = BackquoteAsInteger(['git', 'cl', 'status', '--field=id'])
patchset = BackquoteAsInteger(['git', 'cl', 'status', '--field=patch'])
if issue:
description = gcl.GetIssueDescription(issue)
description = Backquote(['git', 'cl', 'status', '--field=desc'])
else:
description = m.group(2)
self.change = presubmit_support.GitChange(name, description, absroot, files,
......
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