Closed Bug 1626028 Opened 4 years ago Closed 1 year ago

Can't use moz-phab reorg to drop a revision from a stack that was abandoned already

Categories

(Conduit :: moz-phab, defect, P3)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mgaudet, Assigned: sheehan)

References

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

I abandoned a revision in the middle of stack on phabricator, after reworking my patches to eliminate the need for that revision.

I then tried to use moz-phab reorg to drop that from the stack, and got this instead:

matthew@xtower:~/unified$ moz-phab reorg 585250:98dfaf245e97 
Reorganisation based on 7 commits:
Stack will be reorganised:
 * D67571 will depend on D67569
 * D67570 will be abandoned
Perform reorganisation (YES/No)? y
Validation errors:
  - You can not abandon this revision because it has already been closed. Only open revisions can be abandoned.

Which is unexpected: I expected that it would instead do the right thing, given that the revision in question was already abandoned.

The right thing would be:
* D67571 will depend on D67569
Without abandoning the revision, right?

We've made the workflow to remove the commit in the local stack and then call reorganize.

I agree though. MozPhab could recognize that the D67570 is already abandoned and skip this step...

Keywords: conduit-triaged
Priority: -- → P3

Right; the abandon step is already done, so should just not error out, update the links, and keep on keeping on :)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3
Assignee: nobody → sheehan

moz-phab reorg fails to properly re-org a revision stack
when there is a revision in the abandoned state that we
are attempting to remove from the stack.

Add a second revision fetch to retrieve remote revision
information for patches in the stack which are missing
on our local stack. Then pass the set of abandoned
revisions through to stack_transactions to avoid
adding an "abandon" transaction to the set of changes
to make for that revision.

Depends on D167181

This fix for this bug is in 1.4.0rc0 if you want to give it a try, :mgaudet. It will be in a full release by some time next week.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: