Closed Bug 758634 Opened 13 years ago Closed 10 years ago

Seeing revisions of a given file

Categories

(Webtools Graveyard :: DXR, defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 962108

People

(Reporter: lionel, Unassigned)

Details

(Whiteboard: mxr-parity)

I haven’t figured out how to see a particular version of a file using dxr. mxr supports that with ?rev=
Priority: -- → P3
Whiteboard: mxr-parity
To support this, we'll need to move the source code rendering to happen at request time. As a result, we'll need to keep a copy of the hg repo locally and rethink how to get it there. A target folder will no longer contain any HTML: just the SQL index, a conf file, and a checkout of the source (or a pointer to it).
(In reply to comment #1) > To support this, we'll need to move the source code rendering to happen at > request time. As a result, we'll need to keep a copy of the hg repo locally and > rethink how to get it there. A target folder will no longer contain any HTML: > just the SQL index, a conf file, and a checkout of the source (or a pointer to > it). Do we? We can just make the case where you want to view a specific revision of a file an exception, and continue to serve normal HTML files for normal file requests, right?
I think the reason I didn't move HTML generation to the server was the fact that there's a lot of metadata (ie. links with references etc.) to embed in the HTML files. And the way this metadata is obtained from plugins isn't super cheap.
The other thing we can do for non-current revs (initially) is to cheap out and turn them into redirects to some other existing hg viewer, etc.
Ehsan: I don't really want to maintain 2 separate code paths; it's tangled enough in there. :-) However, a nice middle-of-the-road approach might be to cache (or stash at build time) the metadata needed to render up the current-rev page at request time, so it wouldn't be expensive to fetch. Anyway, too soon for bikeshedding on this; I was just jotting down ideas for myself. Thanks for the background, Jonas!
How about just keeping multiple versions of the generated HTML file, and just make sure that the links would still work (by setting up a proper <base> tag or something)?
This sounds like couchdb's indexing system. It saves multiple version of the same file with an incremental base number followed by the rev-number. something like 1-abcdef12345, 2-abcdef12345 and so forth.
We'll show rev-pinned files within DXR so we can maintain highlight ranges. Thus, this ends up a dupe of bug 962108.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
No longer blocks: 1097091
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.