2.5 and "hgweb: display difference for a changeset against any parents (issue2810)"

Mads Kiilerich mads at kiilerich.com
Tue Jan 29 14:48:50 CST 2013


I just noticed http://hg.intevation.org/mercurial/crew/rev/d605a82cf189 
and do not feel comfortable about it.

TLDR: ui regression and potential server load / dos factor regression.

The change introduces two extra lines in hgweb on /rev/ pages for all 
changesets, such as:
change baseline     8216eb592dcd
current baseline     8216eb592dcd
or for merges: http://hg.intevation.org/mercurial/crew/rev/e8c9b13c7799

1. It thus doesn't address Matt's initial comment "probably no need ... 
to show multiple links if there's no p2" 
http://selenic.com/pipermail/mercurial-devel/2012-November/046116.html . 
It seems like all the discussion focussed on other important requisites 
and it never came back to look at the actual change. When the page shows 
a diff against p1 then these two lines will be exactly like the 
"parents" line and serve no purpose.

2. It looks bad visually because the two "th" hint words show up on 
different lines and the "td" node id is centered, while other pages show 
that "th" is top aligned.

3. Mercurial do not have a 'baseline' concept and it is far from obvious 
what these numbers and links to. Something like "diff parent" or "diff 
against" would be more obvious. All this info is also not related to the 
changeset but to the diff that is shown (especially not if it isn't a 
parent). I think it would be better to put the info in the "sourcefirst" 
line as for instance:
   line diff  1683bca31752:e8c9b13c7799  (against other parent: 
848345a8d6ad:e8c9b13c7799)
(with some reference to non-git diff format) (and with the last part 
obviously only to be shown when there is another parent)

4. It is possible to specify other diff ranges than just parents. That 
can lead to some confusing diffs that has very little to do with the rev 
it should show. If that is a feature then it should be somewhere else - 
not on the rev page. On the rev page it should be restricted to one of 
the parents. We could introduce a 'diff' view or page ... but then it 
would no longer be the 'changeset' page.

5. It is also possible to specify for instance a null:tip range. That 
can potentially give bigger downloads and more server load than 
allow_archive ... and without any simple way to disable it. I guess I 
could make the intevation server very busy by posting a direct link.

We could try to evaluate whether these issues really are serious and fix 
the important ones ... but as it is now I don't think it is ready for 2.5.

/Mads


More information about the Mercurial-devel mailing list