classification
Title: hg.python.org: log page entries don't always link to revision
Type: behavior Stage: resolved
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: chris.jerdonek, ezio.melotti, pitrou
Priority: normal Keywords:

Created on 2012-09-11 11:28 by chris.jerdonek, last changed 2013-01-24 05:04 by ezio.melotti. This issue is now closed.

Messages (4)
msg170290 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2012-09-11 11:28
On hg.python.org, it seems like the entries on the "log" page don't
always link to the corresponding revision, for example some of the rows in--

http://hg.python.org/cpython/shortlog/1d9e89f6abec

This seems to happen whenever the revision description begins with
text that results in a link to something else (e.g. an issue number).  See, for example, the row for--

"#15886: remove redundant phrase"

In contrast, the "graph" page seems always to link to the revision:

http://hg.python.org/cpython/graph

Related to this, if the description field contains text that results
in a link to something else, then the UI doesn't make a distinction
between the portion of the description that links to the revision and
the portion that links to the something else.

For example, with description text "Fix for fcc629208842", "Fix for"
links to the revision for the log entry, but "fcc629208842" links to
the named revision, and there is no separation or visual indicator
that the two portions of text link to different things.

It might be better if the revision link was separate from the
description text.  That would be one way to address both of the issues
above.

(This was originally posted to python-dev here:
http://mail.python.org/pipermail/python-dev/2012-September/121635.html )
msg180503 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-01-24 03:06
This should now be fixed (http://mail.python.org/pipermail/python-dev/2013-January/123680.html).

> This seems to happen whenever the revision description begins with
> text that results in a link to something else (e.g. an issue number).

To elaborate a bit on what I wrote in the email, I'll provide a few examples.  Here <a rev></a> is a link to the revision page, <a bpo></a> to the bug tracker, and the 4 steps shows the original message, the resulting link in the "shortlog" page, the link added by interhg and how the browser interprets the invalid HTML:
1) issue at the beginning:
#12345: fix foo  <- commit message
<a rev>#12345: fix foo</a>  <- normal link
<a rev><a bpo>#12345</a> fix foo</a>  <- interhg (invalid html)
<a rev></a><a bpo>#12345</a> fix foo <- resulting html

2) issue in the middle:
Issue #12345: fix foo  <- commit message
<a rev>Issue #12345: fix foo</a>  <- normal link
<a rev>Issue <a bpo>#12345</a> fix foo</a>  <- interhg (invalid html)
<a rev>Issue </a><a bpo>#12345</a> fix foo  <- resulting html

In case 1) the revision link ends up being empty, and there's no way to get to the revision page.  In case 2) everything before the issue number links to the revision page, the #12345 links to the bug tracker, and everything after that is not a link.

> In contrast, the "graph" page seems always to link to the revision

This seems to be because that page is not affected by the interhg extension.

> the UI doesn't make a distinction between the portion of the 
> description that links to the revision and the portion that links
> to the something else.

That's because the link to the revision page ends right where the one for the issue begins.

> For example, with description text "Fix for fcc629208842",

FWIW all that I said about issues is true for changeset ids.  However the fix I added for issue has not been applied for csids (they are not really common in commit messages, and usually they are not at the beginning).

> It might be better if the revision link was separate from the
> description text.

I did the opposite -- I left the revision link there and created a separated link to the issue at the end of the description. 

I think this issue can be closed now, even if there still some room for improvement.
msg180506 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2013-01-24 03:53
>> It might be better if the revision link was separate from the
>> description text.
> I did the opposite -- I left the revision link there and created a separated link to the issue at the end of the description. 

Some downsides of the selected approach are that it doesn't work for descriptions referencing more than one issue and/or containing a changeset reference.  It also adds clutter by repeating the issue number.

I may create a new issue for improving this.
msg180509 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2013-01-24 05:04
True.

The fix is far from being ideal, but it's a good compromise given the limitations of interhg IMHO.

An RFE for interhg should be created, to allow to specify the pages affected by each regex and/or use different regexs on different pages.
History
Date User Action Args
2013-01-24 05:04:16ezio.melottisetmessages: + msg180509
2013-01-24 03:53:52chris.jerdoneksetmessages: + msg180506
2013-01-24 03:06:32ezio.melottisetstatus: open -> closed
type: behavior
messages: + msg180503

assignee: ezio.melotti
resolution: fixed
stage: resolved
2012-09-11 11:28:20chris.jerdonekcreate