New issue
Advanced search Search tips

Issue 671091 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

git cl description leave unpublished edit if stop to modify description

Project Member Reported by tikuta@chromium.org, Dec 5 2016

Issue description

 $ git cl desc
Traceback (most recent call last):
  File "/usr/local/google/home/tikuta/git/depot_tools/git_cl.py", line 5415, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/google/home/tikuta/git/depot_tools/git_cl.py", line 5397, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/usr/local/google/home/tikuta/git/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/usr/local/google/home/tikuta/git/depot_tools/git_cl.py", line 3922, in CMDdescription
    cl.UpdateDescription(description.description, force=options.force)
  File "/usr/local/google/home/tikuta/git/depot_tools/git_cl.py", line 1531, in UpdateDescription
    description, force=force)
  File "/usr/local/google/home/tikuta/git/depot_tools/git_cl.py", line 2483, in UpdateDescriptionRemote
    description)
  File "/usr/local/google/home/tikuta/git/depot_tools/gerrit_util.py", line 610, in SetCommitMessage
    ReadHttpResponse(conn, ignore_404=False)
  File "/usr/local/google/home/tikuta/git/depot_tools/gerrit_util.py", line 373, in ReadHttpResponse
    raise GerritError(response.status, reason)
gerrit_util.GerritError: Conflict: New commit message cannot be same as existing commit message

 $ git cl desc
The description cannot be modified while the issue has a pending unpublished edit.  Either publish the edit in the Gerrit web UI or delete it.

Press Enter to delete the unpublished edit, Ctrl+C to abort.


Is it better to not leave unpublished edit if same commit message were sent?
 
Cc: -serg...@chromium.org
Components: -Infra>Git Infra>Codereview>Gerrit Infra>SDK
Labels: Proj-Geri
Good point, thanks for reporting! Please mark this as Infra>SDK and Infra>Codereview>Gerrit in the future.
Labels: -Proj-Geri Milestone-Dogfood Proj-Gerrit-Migration
Status: Available (was: Untriaged)
Owner: aga...@chromium.org
Status: Started (was: Available)
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 13 2016

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

commit e9373d6e92957c70d9ccc5595c5dc0855fbb6a18
Author: Aaron Gable <agable@chromium.org>
Date: Tue Dec 13 20:28:45 2016

Clean up after failed gerrit cl description edits

If either the edit creation or edit publishing fail, we're left with
an unpublished edit hanging around. This can result in a follow-up
invocation of 'git cl desc' (e.g. if the user changes their mind, or
retries) will also fail. So, clean up after ourselves.

BUG= 671091 

Change-Id: Icfe53996acf2555b82be0695a3c86ebb8c50b936
Reviewed-on: https://chromium-review.googlesource.com/418449
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/e9373d6e92957c70d9ccc5595c5dc0855fbb6a18/gerrit_util.py

Comment 7 by aga...@chromium.org, Dec 13 2016

Status: Fixed (was: Started)

Comment 8 by tikuta@chromium.org, Dec 14 2016

Status: Verified (was: Fixed)
Thank you for fixing.

Sign in to add a comment