Page MenuHomePhabricator

When a commit is discovered, treat the related revision's "Related Tasks" as "Ref Txxx"
Closed, ResolvedPublic

Description

See PHI1555.

Revisions may be related to tasks with a DifferentialRevisionHasTaskEdgeType::EDGECONST edge, either via Edit Related Objects...Edit Tasks in the web UI or by running arc diff on a branch named Txxx.... However, this relationship is not transferred to commits, so commits don't end up attached to tasks and don't show up in the (recently updated) "Related Changes" table.

For now, I plan to treat these relationships like we treat Ref Txxx in the commit message, and effectively copy the edge when we discover a commit. Copying edges isn't great, but "Ref" and "Fixes" sort of work like this already, and even if this is walked back later it isn't a big deal.

See also T3577 (which has some adjacent discussion) and T11934.

Event Timeline

epriestley triaged this task as Low priority.Nov 21 2019, 4:02 PM
epriestley created this task.

@epriestley what's blocking landing this diff?

I just wanted to hold it across the release cut, it's headed to master shortly.

One minor issue with this is that there's some duplication when the commit Fixes Txxx and the associated revision already has the edge (which is very common if the commit Fixes Txxx, because the revision almost always also Fixes Txxx):

This could probably be fixed by making "alice closed X as Y by committing Z" also write the relationship edge.