azzurris / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

request "repo rollback" command #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reported by Andrew D. Stadler (Google) <stadler@android.com> on Tue May 26 
13:51:51 PDT 2009
Source: JIRA REPO-35

How exactly does one rollback a submitted change?

The workflow wiki says,

#  Use git revert [SHA1-to-revert] to create a new commit that is a negative
of the submitted SHA1.
#  Use repo upload to push that rollback into gerrit for review.

Sounds good except, how do you know which SHA1 to use?  For example, looking
at #3054 (23 May 18:58) I see three entries, and here are some snippets from
them:

tree    34a2c936f3f92745552e6f961efd421a9a453848
parent  61d8c706f809eaefcc1122194c787ea834a64159
parent  34975da6472e6a466d04e5e33cdc7edf9a6e1676

Merge commit '34975da6472e6a466d04e5e33cdc7edf9a6e1676'
* commit '34975da6472e6a466d04e5e33cdc7edf9a6e1676':

---
commit  34975da6472e6a466d04e5e33cdc7edf9a6e1676
tree    0a7f302fe4bfae31a0df37863983022d8bb2e8be
parent  474acb9ad815cd2104217236c607359476ce470b
parent  e281887e8299a3b309812dfaafc6f089336be787

---
commit  e281887e8299a3b309812dfaafc6f089336be787
tree    f5cfc1349f0791c0bcfbf698edcd096178aaab68
parent  e1b02e4f2279e3eb4b9bc280fa2ded7bb07a92ae

I count 8 sha-1 values listed here.

Given that it takes a few steps to get this done, and some uncertainty, would
it be possible to add a "repo rollback" command that would allow you simply
enter a CL number (e.g. "repo rollback 3054") and have it DWIM ?

Original issue reported on code.google.com by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:10

GoogleCodeExporter commented 9 years ago
Comment by Shawn Pearce <sop@google.com> on Tue May 26 15:07:29 PDT 2009

*sigh*, I have no idea what server 3054 is on that you are talking about.

But besides that.

You should use the commit SHA-1 next to the default expanded patch set for the
change.  E.g. consider if change https://review.source.android.com/10019 was
submitted.  To revert this, we would need to issue `git revert
86b5102f54caa80e51a3b8c5ec8c4f5bcb4f6c57` as 86b510... is the SHA-1 for patch
set 4, which is the current patch set.

Right now I'm slightly negative on adding any new functionality to repo if it
isn't in the critical day-to-day workflow path of several thousand people.
Everyone wants cake, wants to have it on their desk, wants to eat it, and
wants a pony delivered in the corner of the room, to ride to that meeting they
really don't want to be in later today.  Adding new commands to an existing
mess is only going to make matters worse, not better.  E.g. "repo download"
currently has broken semantics because you can't use "repo download" from the
external review.source.android.com server to download to something based on a
private company mirror.  "repo rollback" as you propose as a similar problem.
Its also likely that GERRIT-175 will make matters worse here, not better, as
it moves a whole slew of the change number -> commit SHA-1 mapping data into
archive repositories.

Original comment by code-rev...@gtempaccount.com on 24 Sep 2009 at 9:11

GoogleCodeExporter commented 9 years ago

Original comment by sop+code@google.com on 24 Sep 2009 at 11:09