Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/review/git-codereview: add change -d #9298

Open
rsc opened this issue Dec 12, 2014 · 7 comments
Open

x/review/git-codereview: add change -d #9298

rsc opened this issue Dec 12, 2014 · 7 comments
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Dec 12, 2014

We should have a change -d command that you run at the same time you click Abandon in the web UI. Or maybe it even does the Abandon for you too. It's too hard to back everything out by hand.

@griesemer ran into this with the peano change. @adg

@mikioh mikioh changed the title review/git-review: add change -d git-codereview: add change -d Jan 4, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title git-codereview: add change -d x/review/git-codereview: add change -d Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-review label Apr 14, 2015
@ysmolski
Copy link
Member

ysmolski commented Nov 7, 2018

I would like to work on it. How can we abandon the change in gerrit through git protocol? Or should we use gerrit API for that?

Never mind my dumb question, please.

@ysmolski
Copy link
Member

ysmolski commented Nov 7, 2018

Adding this as optional flag (change -d) is not logical. Other flags of the "change" action slightly alter its behaviour, while "-d" would delete the branch/tag and abandon the change in gerrit.

It might be a new action: "abandon". First it tries to abandon the change if it was not abandoned yet. If it was abandoned then it deletes the change branch and a tag. Possibly we could add flags to it to skip abandonment or branch deletion.

@ysmolski
Copy link
Member

ysmolski commented Nov 8, 2018

ping @rsc and @bradfitz for brainstorming.

@agnivade
Copy link
Contributor

agnivade commented Nov 8, 2018

Also @josharian @kevinburke according to owners.

@josharian
Copy link
Contributor

There are several different things this command could do (abandon gerrit changes, delete branch, delete tag), all destructive. And there are lots of ways for gerrit, branches, and tags to be out of sync. I'm nervous about all the ways that this could easily go wrong.

@ysmolski
Copy link
Member

ysmolski commented Nov 8, 2018

I would not say it is destructive in all senses. It will delete tag and branch iff it was abandoned in first place (meaning that gerrit returns abandoned status for a CL). And abandoned change can be restored anytime from gerrit UI. So it cannot delete just a branch which was not mailed first nor some lone tag for successfully merged CL.

@josharian
Copy link
Contributor

Right. Although you'd also want to check that the branch consists only and entirely of abandoned changes, that were fully in sync with gerrit (i.e. matching commit hashes), and that the tag matches the head of the branch. Perhaps I'm unusual, but I fairly often mail only part of a branch, or work on a branch and sit on for a while (due to limited bandwidth), etc.

I suppose I don't really object, if this is implemented very defensively, with good error messages in the case of things not being perfectly aligned.

@seankhliao seankhliao added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. FeatureRequest Issues asking for a new feature that does not need a proposal. labels Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants