Add support for /hgrev/ permalinks for mercurial-based repos
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: kats, Assigned: kats)
References
(Blocks 1 open bug)
Details
This keeps coming up. We should add a /hgrev/ url endpoint that takes a mercurial hash and uses cinnabar to convert to the canonical /rev/<git-hash>/ URL.
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
example of a valid redirect:
https://searchfox.org/mozilla-central/hgrev/c1ab9962ae12c983c6aa344cc31ff28bf87d61c3/gfx/layers/ipc/CompositorBridgeParent.h#148
which will be redirected to:
https://searchfox.org/mozilla-central/rev/f92b30262c8dca96dd456931fb53d3581e15e599/gfx/layers/ipc/CompositorBridgeParent.h#148
Comment 3•5 years ago
•
|
||
For the DXR => Searchfox story:
We have DXR url like this:
https://dxr.mozilla.org/mozilla-central/rev/71224049c0b52ab190564d3ea0eab089a159a4cf/accessible/html/HTMLTableAccessible.cpp#920
Doing a simple s/dxr.mozilla/searchfox/ and s|/rev/|/hgrev/|
will point to
https://searchfox.org/mozilla-central/hgrev/71224049c0b52ab190564d3ea0eab089a159a4cf/accessible/html/HTMLTableAccessible.cpp#920
which will redirect to
https://searchfox.org/mozilla-central/rev/f31f538622d0dfb2d869d4babc4951f6001e9be2/accessible/html/HTMLTableAccessible.cpp#920
Description
•