Page MenuHomePhabricator

get repository from Revision when rendering revision
AbandonedPublic

Authored by avivey on Jan 11 2014, 12:32 AM.
Tags
None
Referenced Files
F15409355: D7931.id.diff
Wed, Mar 19, 4:25 AM
Unknown Object (File)
Jan 27 2025, 9:57 PM
Unknown Object (File)
Jan 27 2025, 7:27 PM
Unknown Object (File)
Jan 23 2025, 9:17 AM
Unknown Object (File)
Jan 23 2025, 12:36 AM
Unknown Object (File)
Jan 21 2025, 9:14 AM
Unknown Object (File)
Jan 9 2025, 9:21 PM
Unknown Object (File)
Dec 9 2024, 3:29 AM

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Summary

one small step away from arcanist projects.

Test Plan

view some revisions; look for 'Browse in Diffusion' link.

Diff Detail

Branch
master
Lint
Lint Passed
Unit
Tests Passed

Event Timeline

This isn't quite correct: each diff in a revision may have a different repository, and this may be for good reasons. For example, maybe in diff 1 I make a change in Phabricator (repository "P"), but my reviewer suggests a simpler/better change fixing a deeper root cause in libphutil (repository "PHU"). I then update with a second diff from libphutil.

I think this use case is generally a good one, and having a single cohesive discussion around how to fix an issue -- even if that discussion spans multiple repositories -- is desirable.

In this case, the repository of $target -- which is a diff -- might not be the same as the repository of the revision.

There's also no $diff->getRepository() method right now, although there likely should be.

(So I think we need to wait for more infrastructure support before we can do this.)

Didn't think about that one... this just seemed like a low-hanging fruit.

The issue I was trying to hit was the case when a revision has a revision but no project, and for some reason the repo can't be inferred from the diff (Which I see happening, from time to time). Then the "browse" button doesn't show; It's easy to attach a repo to the revision, but not to the diff.

I guess this issue will more-or-less go away when the diff will be better at finding the repo.

Yeah, I think this should resolve itself once projects get de-emphasized. We should still revisit this callsite later and swap it over, but waiting for better infrastructure is probably cleanest.