Closed Bug 1773145 Opened 2 years ago Closed 1 year ago

When reorganizing a stack with already-accepted commits, moz-phab errors

Categories

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

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emilio, Assigned: sheehan)

References

Details

(Keywords: conduit-triaged)

Attachments

(2 files)

$ moz-phab reorg mozilla/bookmarks/central                                                                                                                                                                                                 
Reorganisation based on 5 commits:
Stack will be reorganised:
 * D148554 will depend on D148537
 * D148538 will depend on D148554
 * D148553 will depend on D148538
 * D148558 will depend on D148553
Perform reorganisation (YES/No)? 
Phabricator Error: Validation errors:
  - You can not accept this revision because you are the revision author. You can only accept revisions you do not own. You can change this behavior by adjusting the "differential.allow-self-accept" setting in Config.

Right now, the first two patches in that stack are accepted.

This is likely due to this transaction. A good place to start would be a test case to reproduce this issue.

Severity: -- → S3
Keywords: conduit-triaged
Priority: -- → P3

Remove the busted preserve_status functionality. The idea behind this
code was to have a post-operation transaction that reset the status
of a revision to the previous state before editing the revision.
In practice this code hit many edge cases that made it unusable
(you cannot accept your own revision, for example). We remove
the preserve_status flag as well as the revision state to
transaction mapping. We keep the post_trans functionality instead
of reverting to a flag specifically for wip as the model
of a "post edit transaction" more closely resembles our intended
use case.

Assignee: nobody → sheehan
Status: NEW → ASSIGNED

Add a simple edit_stack_relationship function to ConduitAPI
that calls differential.revision.edit without any of the
logic present in edit_revision. The edit_revision function
has logic baked into it for updating various statuses, submitting
wip revisions, and it tasked with both updating and creating
revisions.

This new method simply calls differential.revision.edit with
the specified transactions for the given revision. We can use
this function to update the successor/predecessor relationships
between revisions without making any updates to revision state.

Depends on D166931

Attachment #9312466 - Attachment description: conduit: add a simple `edit_stack_relationship` function for re-org (Bug 1773145) r?grammar,zeid → conduit: add a simple `apply_transactions_to_revision` function for re-org (Bug 1773145) r?grammar,zeid

Hey Emilio, I just released a 1.3.1rc0 release for moz-phab that should fix this issue. Can you let me know if this works for you?

You can get moz-phab pre-releases by setting updater.get_pre_releases = True in your config and then moz-phab self-update.

Flags: needinfo?(emilio)

I reorganized the patch for bug 1807838 (which should now go to another bug) and it worked great!

Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #5)

I reorganized the patch for bug 1807838 (which should now go to another bug) and it worked great!

Perfect, then the fix for this will be in 1.3.1. I'll get that out this week. :)

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

Attachment

General

Created:
Updated:
Size: