Open Bug 1493422 Opened 4 years ago Updated 3 years ago

Link to original source repo for vendored code


(Webtools :: Searchfox, enhancement)

Not set


(Not tracked)


(Reporter: kats, Unassigned)


(Depends on 1 open bug)


For code that's vendored into m-c, getting the original blame (as opposed to the blame of when the code was vendored) is nontrivial. We can try to make it easier by linking to the source repo in the navigation panel. Having moz.yaml files would help with this but those don't seem to have wide adoption yet.
We could also use the repository property from any ancestor Cargo.toml files, which would take care of most (if not all) of third_party/rust

I think this can be accomplished by incorporating links to the external repo into the blame repository. The rough idea I have is that we would need to create a mapfile that maps from main repo revs to vendored repo revs (e.g. "at m-c revision X we pulled webrender revision Y" would produce a mapping of X:gfx/wr/ -> or equivalent). When building the m-c blame repo at rev X we do it the way we do now, but we also add an extra field to the blame repo data that includes the true blame (some ancestor of Y, to be discovered by running the blame generator tool on the WR repo up to revision Y). Then we can surface that information in the blame popup.

Anybody who is vendoring code into m-c and wants to avail of this would need to provide a mapfile of revisions, and we'd have to rebuild the blame repo with that information. If we can make building the blame repo fast enough (via bug 1627532 and optimizations) then this shouldn't be too hard to do.

No longer depends on: 1627532
You need to log in before you can comment on or make changes to this bug.