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
experimental/szager/collated-output
tedbo@google.com 15 years ago
parent b1901a6e45
commit 71a51e8fe7

@ -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,

Loading…
Cancel
Save