Closed Bug 394650 Opened 16 years ago Closed 16 years ago

Make line numbers linkable when viewing files/annotate for


( Graveyard :: Server Operations: Projects, task)

Not set


(Not tracked)



(Reporter: Mardak, Assigned: Mardak)


(Whiteboard: [fixed in mercurial 1.0])


(1 file, 1 obsolete file)

Attached patch v1 (obsolete) — Splinter Review
For "file" view on mercurial gitweb, has line numbers but they aren't links like on mxr. For "annotate" view, there are no line numbers at all.

Each line gets an anchor with id "l<num>" that links it itself.

Perhaps this should get pushed upstream?
Attached patch v2Splinter Review
Updated the patch to change the default template as well, so it's more likely to land upstream. So if that happens, this bug would be to grab those changes and run a crew/crew-stable version of mercurial on ?


Add line anchors to file and annotate views for hgweb

This patch makes the line numbers into anchor tags with id "l<num>"
(e.g., l123) that link to itself with href=#l<num>. Updates default
and gitweb templates.

hgweb's ability to show the whole repository for any given changeset
is really useful, but referring to a particular line of a file such as
from a bug report would be nice. The patch adds a couple new
template-vars such as lineid and linenumber. Also, the annotate pages
didn't have line numbers to begin with, so there's a column for that
Attachment #279351 - Attachment is obsolete: true
Assignee: server-ops → aravind
I do not want to maintain our own copy of mercurial builds, but would rather depend on this being present in the upstream builds.  I can change templates and such to customize the look, etc, but I'd rather not modify code that ships as a part of the app.

Could you please work with upstream devs to get this path there?
I've submitted a patch to the mercurial-devel list

It adds a couple new template vars for use on annotate, changeset, diff, file views. The patch also includes the changes for the map files themselves, but if those don't make it in upstream, we can apply those template changes ourselves.
Moving this to projects since I will work on this next quarter.
Component: Server Operations → Server Operations: Projects
Fixed upstream ( and currently working great on!

(Should be FIXED UPSTREAM, but I guess WORKSFORME is good enough.)
Closed: 16 years ago
Resolution: --- → WORKSFORME
Actually, I was trying to figure out how it got fixed and noticed that it seemed to be implemented exactly how I implemented it..

I sent in a patch some time ago back in September but never kept up to see if it ever got on. ;)

Apparently it did and made it for Mercurial 1.0. :)
Resolution: WORKSFORME → ---
Assignee: aravind → edilee
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in mercurial 1.0]
Product: → Graveyard
You need to log in before you can comment on or make changes to this bug.