Closed
Bug 938222
Opened 11 years ago
Closed 4 years ago
Show VCS hash on page footers
Categories
(Webtools Graveyard :: DXR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: erik, Assigned: rricard)
References
Details
(Whiteboard: easy)
Attachments
(1 file)
250.31 KB,
image/jpeg
|
Details |
It's sometimes useful to know the exact version of the source code which is indexed. Show the VCS revision identifier (git hash, etc.) somewhere. A natural place might be with the "Built 6 days ago" indicator at the bottoms of pages.
Reporter | ||
Comment 1•11 years ago
|
||
On the other hand, this will likely require a bit of design work, since the most natural source of the information is the omniglot plugin, but there are no currently exposed hooks in the plugin API for getting stuff into the page footer.
Updated•10 years ago
|
Whiteboard: easy → easy, mxr-parity
Comment 2•10 years ago
|
||
I want to work on this bug.Please give me some pointers on how to start.
Reporter | ||
Comment 3•10 years ago
|
||
This bug may be marked "easy", but it's not trivial. The solution will likely involve calling the omniglot plugin's get_rev() method (when the indexed code is checked into a version control system at all) and then outputting the result in the page footers. I recommend doing this work on the "es" (elasticsearch) branch rather than master, as we've rewritten the omniglot plugin there to conform to the new plugin API, and the way we render pages has changed. Most pages are still rendered at build time, so changes will be needed in build.py. Folder listings are now renderered at request time, so changes to app.py will be needed as well. Do pop into #static if you have more questions; there are a number of fine people there who can answer. Welcome to the project!
Reporter | ||
Comment 4•10 years ago
|
||
(Sritanu isn't working on this bug after all. Someone else can feel free to claim it.)
Comment 5•10 years ago
|
||
Hi there, I am a bit confused by this item. I'm looking at this page right here: http://dxr.mozilla.org/mozilla-central/source/client.mk On the right-hand side in the navigation pane I see the following string: "Mercurial (ca6b46cbca3b)". What is that? Looking at the log it doesnt appear to be the latest hg revision. Also, where are you seeing the "Built 6 days ago" string? Do you actually mean the "This page was generated by..." string? I think I can take this item, I'm just trying to understand the requirements a bit. The page appears to have changed since the comments were written, that or I'm looking at the wrong page.
Reporter | ||
Comment 6•10 years ago
|
||
This bug involves adding a revision identifier to the footers of pages. Right now, the only identifiers are, as you observe, at the bottoms of nav panes on file views; there's nothing on folder views.
> Also, where are you seeing the "Built 6 days ago" string? Do you actually mean the "This page was generated by..." string?
Yes.
Like I said above, it's not a simple markup change; it'll hoisting some VCS concepts up out of the omniglot plugin into DXR proper.
Reporter | ||
Comment 7•10 years ago
|
||
"it'll involve", that is
Comment 8•10 years ago
|
||
Understood. I think I can handle this but Ill have to take a closer look the omniglot plugin.
Reporter | ||
Comment 9•10 years ago
|
||
If you do try to tackle this, do it on the "es" branch. Omniglot (and some of the rendering pipeline) has been rewritten there.
Assignee | ||
Comment 10•10 years ago
|
||
Hi ! I wanted to tackle some dxr bugs before going into plugin development (If I could be of some help to completely get rid of MXR !). This one seems to get old so I thought I could start working on it. If Torehan still want to work on this (or is currently working on this), I don't mind him to reuse what I just did and fix the bug himself ! This is still a work in progress (I only did the build.py part for now) and it introduces a new metadata interface in the plugin system so I won't be offended if it's rejected because I add unnecessary stuff ! You can follow my WIP branch here: https://github.com/rricard/dxr/tree/938222
Assignee | ||
Comment 11•10 years ago
|
||
Anyway, I'm done for today... (it's getting really late here…) Maybe I'll finish this tomorrow if I have time but it's more likely that I will finish this this weekend. Don't hesitate to give me some feedback here or just publish a completely different patch here, I just realize that Torehan may have worked on his side for one month and I'm just popping here like that. So if you worked on something, I don't want you to throw away your patch. It's just a WIP on my side and I don't mind discarding it !
Flags: needinfo?(torehan7)
Comment 12•10 years ago
|
||
Robin, go ahead and take this. I havent been able to commit the time to taking this. Thanks for asking.
Flags: needinfo?(torehan7)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ricard.robin
Assignee | ||
Comment 13•10 years ago
|
||
Ok, I think I'm stuck here. I don't want to use the plugins at "serve" time (hg/git ops can be expensive) when doing a tree lookup so I think we have to index the metadata too… If we're doing so, we should stop precompiling the source pages and generate them at serve time…
Flags: needinfo?(erik)
Assignee | ||
Comment 14•10 years ago
|
||
Note to myself: see line 483 in build.py for adding new data in the index.
Assignee | ||
Comment 15•10 years ago
|
||
Ok, I think I've got a bit beyond the scope of this bug… And I think there is better things to do with than this metadata thing… Waiting for your feedback on this !
Assignee | ||
Comment 16•10 years ago
|
||
Note: I opened a PR on this: https://github.com/mozilla/dxr/pull/369
Reporter | ||
Comment 17•10 years ago
|
||
Hi, Robin! I'll have a look at your patch soon; it was a holiday weekend in the US, so we were all out making merry. :-)
Flags: needinfo?(erik)
Assignee | ||
Comment 18•10 years ago
|
||
Don't worry, I expected that ! :) I don't want to rush you, take your time !
Comment 19•9 years ago
|
||
We now have a VCS hash in the links menu on the right side of the page, as the heading above Permalink. Example: https://dxr.allizom.org/mozilla-central/source/client.mk.
Comment 20•9 years ago
|
||
Is this bug just for showing it on directory listings now? If so, please update the summary and remove mxr-parity
Reporter | ||
Updated•9 years ago
|
Summary: Show hash or other VCS identifier of the indexed source → Show VCS hash on page footers
Whiteboard: easy, mxr-parity → easy
Comment 21•4 years ago
|
||
We are not going to work on that for dxr!
Please use https://searchfox.org/ instead
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Updated•3 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•