New issue
Advanced search Search tips

Issue 614587 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 616753



Sign in to add a comment

git cl description adds unexpected BUG= line at the end.

Project Member Reported by yyanagisawa@chromium.org, May 25 2016

Issue description

I am using "git cl upload" with squash.  I usually upload change list to gerrit.

When I execute "git cl upload", somebody automatically add BUG= line at the bottom.  Since I do not have corresponding bug, I remove the "BUG=".

When I try to edit the description with "git cl description", somebody add "BUG=" line after "Change-Id:" and I fail to update description.

$ git cl description
Traceback (most recent call last):
  File "/(snip)/depot_tools/git_cl.py", line 4913, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/(snip)/depot_tools/git_cl.py", line 4895, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/(snip)/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/(snip)/depot_tools/git_cl.py", line 3352, in CMDdescription
    cl.UpdateDescription(description.description)
  File "/(snip)/depot_tools/git_cl.py", line 1313, in UpdateDescription
    return self._codereview_impl.UpdateDescriptionRemote(description)
  File "/(snip)/depot_tools/git_cl.py", line 2184, in UpdateDescriptionRemote
    description)
  File "/(snip)/depot_tools/gerrit_util.py", line 569, in SetCommitMessage
    ReadHttpResponse(conn, ignore_404=False)
  File "//(snip)/depot_tools/gerrit_util.py", line 349, in ReadHttpResponse
    raise GerritError(response.status, reason)
gerrit_util.GerritError: Conflict: missing Change-Id in commit message footer:
  ERROR: missing Change-Id in commit message footer

Hint: A potential Change-Id was found, but it was not in the footer (last paragraph) of the commit message.

Hint: To automatically insert Change-Id, install the hook:
curl -Lo `git rev-parse --git-dir`/hooks/commit-msg https://gerrit-review.googlesource.com/tools/hooks/commit-msg ; chmod +x `git rev-parse --git-dir`/hooks/commit-msg
And then amend the commit:
  git commit --amend

Is it possible for me to remove BUG=, or is it mandatory for me to have BUG= even if it is empty?
 
Owner: tandrii@chromium.org
Status: Assigned (was: Untriaged)
Blocking: 616753
Cc: -tandrii@chromium.org
Components: Infra>SDK
Labels: -Pri-3 Pri-1
Status: Started (was: Assigned)
Reproduced and added tests case that exposes this ugly behavior: https://codereview.chromium.org/2033783002
All done. These 3 CLs should fix the problem once and for all:
  * https://codereview.chromium.org/2033783002 (document current behavior as a test case)
  * https://codereview.chromium.org/2028303006 (refactor library to work with footers)
  * https://codereview.chromium.org/2038673002 (actually fix the bug)
Components: -Infra>Codereview Infra>Codereview>Gerrit
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/d605a51ccbdcd354cbaddd533c7402080609fe3b

commit d605a51ccbdcd354cbaddd533c7402080609fe3b
Author: tandrii@chromium.org <tandrii@chromium.org>
Date: Fri Jun 03 09:55:00 2016

git cl desc: add test that shows BUG= breaking Change-Id footer.

BUG= 614587 
R=yyanagisawa@chromium.org,andybons@chromium.org

Review-Url: https://codereview.chromium.org/2033783002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300690 0039d316-1c4b-4281-b951-d872f2087c98

[modify] https://crrev.com/d605a51ccbdcd354cbaddd533c7402080609fe3b/tests/git_cl_test.py

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build.git/+/e293a39a1380c961120bb3be9cc391b3888992e8

commit e293a39a1380c961120bb3be9cc391b3888992e8
Author: recipe-roller <recipe-roller@chromium.org>
Date: Fri Jun 03 10:06:18 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

depot_tools:
  https://crrev.com/d605a51ccbdcd354cbaddd533c7402080609fe3b git cl desc: add test that shows BUG= breaking Change-Id footer. (tandrii@chromium.org)

R=yyanagisawa@chromium.org,andybons@chromium.org,tandrii@chromium.org
BUG= 614587 

TBR=martiniss@chromium.org,phajdan.jr@chromium.org

Review-Url: https://codereview.chromium.org/2030763004

[modify] https://crrev.com/e293a39a1380c961120bb3be9cc391b3888992e8/infra/config/recipes.cfg

Project Member

Comment 9 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/f2aa52b56290234adb056d2740b79f14ad6795c1

commit f2aa52b56290234adb056d2740b79f14ad6795c1
Author: tandrii@chromium.org <tandrii@chromium.org>
Date: Fri Jun 03 12:58:20 2016

Refactor git_footers for later use in git cl.

Motivation: git_cl should start understanding Gerrit's git footers,
to avoid appending BUG= after Change-Id: Ixxx line.

R=sergiyb@chromium.org
BUG= 614587 

Review-Url: https://codereview.chromium.org/2028303006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300691 0039d316-1c4b-4281-b951-d872f2087c98

[modify] https://crrev.com/f2aa52b56290234adb056d2740b79f14ad6795c1/git_footers.py
[modify] https://crrev.com/f2aa52b56290234adb056d2740b79f14ad6795c1/tests/git_footers_test.py

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/601e1d17ef7d886e9117f3cd6f963837340a506b

commit 601e1d17ef7d886e9117f3cd6f963837340a506b
Author: tandrii@chromium.org <tandrii@chromium.org>
Date: Fri Jun 03 13:03:54 2016

git cl description: avoid appending BUG= after Change-Id.

R=yyanagisawa@chromium.org,sergiyb@chromium.org
BUG= 614587 

Review-Url: https://codereview.chromium.org/2038673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300692 0039d316-1c4b-4281-b951-d872f2087c98

[modify] https://crrev.com/601e1d17ef7d886e9117f3cd6f963837340a506b/git_cl.py
[modify] https://crrev.com/601e1d17ef7d886e9117f3cd6f963837340a506b/tests/git_cl_test.py

Project Member

Comment 11 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build.git/+/e36d27f85c0620682cb4bfd79aab435dcdf471be

commit e36d27f85c0620682cb4bfd79aab435dcdf471be
Author: recipe-roller <recipe-roller@chromium.org>
Date: Fri Jun 03 13:07:39 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

depot_tools:
  https://crrev.com/f2aa52b56290234adb056d2740b79f14ad6795c1 Refactor git_footers for later use in git cl. (tandrii@chromium.org)

R=sergiyb@chromium.org,tandrii@chromium.org
BUG= 614587 

TBR=martiniss@chromium.org,phajdan.jr@chromium.org

Review-Url: https://codereview.chromium.org/2031303002

[modify] https://crrev.com/e36d27f85c0620682cb4bfd79aab435dcdf471be/infra/config/recipes.cfg

Project Member

Comment 12 by bugdroid1@chromium.org, Jun 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/build.git/+/c5a35765e120b4be648a7de7b2cf1b43771dc554

commit c5a35765e120b4be648a7de7b2cf1b43771dc554
Author: recipe-roller <recipe-roller@chromium.org>
Date: Fri Jun 03 13:17:53 2016

Roll recipe dependencies (trivial).

This is an automated CL created by the recipe roller. This CL rolls recipe
changes from upstream projects (e.g. depot_tools) into downstream projects
(e.g. tools/build).

More info is at https://goo.gl/zkKdpD. Use https://goo.gl/noib3a to file a bug
(or complain)

depot_tools:
  https://crrev.com/601e1d17ef7d886e9117f3cd6f963837340a506b git cl description: avoid appending BUG= after Change-Id. (tandrii@chromium.org)

R=yyanagisawa@chromium.org,sergiyb@chromium.org,tandrii@chromium.org
BUG= 614587 

TBR=martiniss@chromium.org,phajdan.jr@chromium.org

Review-Url: https://codereview.chromium.org/2034073002

[modify] https://crrev.com/c5a35765e120b4be648a7de7b2cf1b43771dc554/infra/config/recipes.cfg

Status: Fixed (was: Started)
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 17 2016

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 17 2016

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 17 2016

Sign in to add a comment