Page MenuHomePhabricator

Changing the commit description creates out-dated patch.
Closed, ResolvedPublic

Description

See https://gerrit.wikimedia.org/r/47089

I used git-review to upload patch set 6. Then, accidentally, without refreshing my windows to see the new patchset, I changed the commit message to add a bug number. Rather than producing some error message or the like, it changed the commit message of patch set 5 and made it patch set 7, effectively undoing the in between patch.


Version: wmf-deployment
Severity: normal

Details

Reference
bz52292

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:05 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz52292.
bzimport added a subscriber: Unknown Object (MLST).

Mhmmm. As your browser window was still at patch set 5, it looks
like expected behaviour to me.

I would not want gerrit to second guess the one who edited
the commit message of patch set 5 or even forbid editing the
commit message in that case.

How is that expected? It'd be like committing a database transaction where the data has changed since it was last read, or a more appropriate example: having a edit conflict on Wikipedia be resolved just by overwriting the last revision. The correct behavior would be to display an error saying there was an edit conflict.

No, not necessary.

Our last patchset is patch set 5 which is revision bbb123 based on parent aaa456

One developer submitted patch set 6 (revision ccc789) based on the parent revision aaa456 as well.

Then another developer edits something which means submitting independent patch set 7 based on the parent revision aaa456 as well. It can include stuff from patchset 5 but does not have to.

All patchsets are independent "children" of the parent. Sometimes parents differ
when you "rebase" your stuff.

One can squash (merge) few changes into one - I would checkout patch set 6 and then checkout patch set 7 by using "git cherry-pick -n" without using another commit. You can use "git-review -X change,patchnr" for that.

  • Bug 59892 has been marked as a duplicate of this bug. ***

I ran into the exactly same problem on gerrit: 111943. It's so annoying.

Aklapper triaged this task as Lowest priority.Mar 23 2015, 6:59 PM

Hi I carnt be 100% sure but I think this was fixed in the upgrade to gerrit 2.12. Please could you re try to see if it is fixed for you please?

No, this is not fixed as you can always create a patch based off of an old one. It's probably a little bit harder to do it accidentally now since it's integrated into the online editor.

Doing it accidentally was kind of lame, but it was never really a bug tbh.

demon claimed this task.

Actually, this is fixed. You cannot begin editing from an older version of a change anymore.