Bug 2677 - Hgweb offers you Atom feeds which never update
Summary: Hgweb offers you Atom feeds which never update
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-04 10:28 UTC by Gervase Markham
Modified: 2012-05-13 04:51 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gervase Markham 2011-03-04 10:28 UTC
Steps to reproduce:

1) Visit a page on Hgweb listing all the files in a directory on the tip, e.g.:
http://hg.mozilla.org/mozilla-central/file/tip/netwerk/dns/

2) Click "Revisions" to get the list of revisions for a file, which takes
you to e.g.:
http://hg.mozilla.org/mozilla-central/log/e56ecd8b3a68/netwerk/dns/effective_tld_names.dat

3) See a feed icon in the list of options at the top and see "Ah, a feed of
changes for this file". Right-click, copy the URL, and paste it into your
feed reader.

Expected Results: an Atom feed of updates to that file, which updates when 
                  new changes are made
Actual Results:   the Atom feed never shows any updates, so you wrongly 
                  assume that there aren't any

The problem is that the Atom feed URL offered is of this form:

http://hg.mozilla.org/mozilla-central/atom-log/e56ecd8b3a68/netwerk/dns/effective_tld_names.dat

This is not the feed for the tip, but the one for that revision (note the
hex digits) - in other words, as far as I can see, it'll never show any
updates at all! This seems a very pointless Atom feed.

Hgweb should be changed to present a more useful Atom feed by default -
perhaps the one for the tip, but it could be more complicated than that, I
don't know. If there is no better way of offering a good feed, offer no feed
rather than the very misleading feed offered now.

Gerv
Comment 1 kiilerix 2011-03-04 10:46 UTC
Mozilla uses their own hgweb style, apparently based on Mercurials gitweb style.

Do you see the problem with plain Mercurial too?

For example http://selenic.com/repo/hg/rev/d931cce7f207?style=gitweb has
correct links in the lower right corner - and so do the Mozilla pages.

Please ask the Mozilla guys to fix their custom templates.
Comment 2 Gervase Markham 2011-03-04 10:49 UTC
The link in the corner of the URL you give is to an atom feed of changes to
the entire repo. Where can I find a link on http://selenic.com/repo/hg/ to
the list of changes to a file, in the same vein as:

http://hg.mozilla.org/mozilla-central/atom-log/tip/netwerk/dns/effective_tld_names.dat

?

Gerv
Comment 3 kiilerix 2011-03-04 11:04 UTC
Mercurial do not provide any links to RSS feeds for a single file, AFAIK.
You could file that as a feature request.

Mozilla can however that in their own templates if they want to.
Comment 4 Gervase Markham 2011-03-04 11:11 UTC
Not so. Here is an example:

http://selenic.com/repo/hg/atom-log/tip/mercurial/localrepo.py

Gerv
Comment 5 kiilerix 2011-03-04 11:36 UTC
Ok, right, the filelog template in the gitweb and monoblue styles
incorrectly links to a specific revision. paper and spartan correctly links
to tip.
Comment 6 Gervase Markham 2011-03-04 11:40 UTC
Are those styles under the control of the Mercurial project (i.e. is this
your bug, or someone else's)?

Gerv
Comment 7 kiilerix 2011-03-04 12:17 UTC
There is a Mercurial issue. You are welcome to fix it - see
http://mercurial.selenic.com/wiki/ContributingChanges ;-)

But I guess Mozilla will have to fix their templates too, depending on how
much they have customized.
Comment 8 Patrick Mézard 2011-03-06 15:15 UTC
monoblue and gitweb links are fixed in crew-stable:

  http://hg.intevation.org/mercurial/crew/rev/f3c2261023e5

Thanks for reporting it.
Comment 9 timeless 2011-03-07 02:39 UTC
it shouldn't use {tip} it should use {branch}
Comment 10 kiilerix 2011-03-07 03:59 UTC
I generally agree, but hgweb has very little awareness of branches so it
could be confusing if we used branches here. Branch support should perhaps
be added everywhere at once.

In some situations it would even be more correct to use bookmark names.
Comment 11 HG Bot 2011-03-07 16:00 UTC
Fixed by http://selenic.com/repo/hg/rev/f3c2261023e5
Patrick Mezard <pmezard@gmail.com>
hgweb: use tip in gitweb/monoblue filelog rss links (issue2677)

(please test the fix)
Comment 12 Bugzilla 2012-05-12 09:17 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:17 EDT  ---

This bug was previously known as _bug_ 2677 at http://mercurial.selenic.com/bts/issue2677