Page MenuHomePhabricator

Extending revert edges
Closed, DuplicatePublic

Description

Now that we have revert edges, it would be nice to extend them a bit further. Specifically, I think that we should:

  • Add an edge or transaction to the revisions owning the reverted commit.
  • If a "fixes" commit is reverted, reopen the Maniphest task.

Revisions and Commits

Event Timeline

joshuaspence raised the priority of this task from to Low.
joshuaspence updated the task description. (Show Details)
joshuaspence added a subscriber: joshuaspence.

See also T2542, T1751.

I'm inclined to think we should not automatically reopen tasks (although it would be reasonable to add a "Reopens" prefix, like "Fixes", to make that easier).

When you send a "Reverts X" revision for review, we probably should publish that to various places too. I'm not sure what the state of the world is today.

Some initial thoughts:

  • Add DiffusionCommitRevertsRevisionEdgeType and DifferentialRevisionRevertedByCommitEdgeType edges.
  • In PhabricatorRepositoryCommitHeraldWorker, when we create the DiffusionCommitRevertsCommitEdgeType edges also create the DiffusionCommitRevertsRevisionEdgeType and DifferentialRevisionRevertedByCommitEdgeType edges. Basically:
    • For each reverted commit, look up the corresponding revision using PhabricatorEdgeQuery.
    • For each revision, create a DiffusionCommitRevertsRevisionEdgeType edge.
    • Do whatever else is needed so that the edge shows up as a transaction on the revision.

Similarly for ManiphestTaskHasRevertingCommitEdgeType and DiffusionCommitRevertsTaskEdgeType edges.