New issue
Advanced search Search tips

Issue 700239 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

`git cl description` returns error if user doesn't modify description

Project Member Reported by iannucci@chromium.org, Mar 10 2017

Issue description

For example:

$ EDITOR=true git cl description
Traceback (most recent call last):
  File "/s/depot_tools/git_cl.py", line 5347, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/s/depot_tools/git_cl.py", line 5329, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/s/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/s/depot_tools/git_cl.py", line 4026, in CMDdescription
    cl.UpdateDescription(description.description, force=options.force)
  File "/s/depot_tools/git_cl.py", line 1475, in UpdateDescription
    self._codereview_impl.UpdateDescriptionRemote(description, force=force)
  File "/s/depot_tools/git_cl.py", line 2465, in UpdateDescriptionRemote
    description, notify='NONE')
  File "/s/depot_tools/gerrit_util.py", line 626, in SetCommitMessage
    raise e
gerrit_util.GerritError: Conflict: New commit message cannot be same as existing commit message

Expected behavior is that it should just exit 0 :)
 
Labels: Proj-Geri
Labels: -Proj-Geri Milestone-Afterglow Proj-Gerrit-Migration
ACK.
Does this actually break any tool?
Status: Available (was: Untriaged)
Status: Started (was: Available)
Actually, there is already a check to avoid setting the same description. However, apparently ChangeDescription object strips the message of whitespace.
Owner: tandrii@chromium.org
https://chromium-review.googlesource.com/455739
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 17 2017

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

commit 680253d31518b5865a45be4d63bc1ed74a4f16e9
Author: Andrii Shyshkalov <tandrii@chromium.org>
Date: Fri Mar 17 14:41:10 2017

git cl description: don't bother if description diff is trailing whitespace.

BUG= 700239 
R=iannucci@chromium.org

Change-Id: Ica4567288c1cd83f72cce5d10c523270b69c36d4
Reviewed-on: https://chromium-review.googlesource.com/455739
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>

[modify] https://crrev.com/680253d31518b5865a45be4d63bc1ed74a4f16e9/git_cl.py

Status: Fixed (was: Started)

Sign in to add a comment