Adding Branch/Files Content in Atom Feed

Jensen, Aaron ajensen at webmd.net
Tue Apr 1 23:03:16 UTC 2014


> Well, hgweb internally has no idea what an 'atom feed' is. The feed styles are just a different template 
> style like paper vs gitweb and the feed links are just pointers with an atom style parameter added.
> 
> So you can consult the corresponding parts of the other styles to see how it's done. Looks like you 
> wanted "branches" (a legacy name from our ancient implemention of branches).

Did that.  The fields are empty.

When I use my templates at the command line, I get back what I expect:

    > hg log -r tip --template "{branch|escape|nonempty}\n{file_mods % '{file|escape|nonempty }\n'}{file_adds % '{file|escape|nonempty }\n'}{file_dels % '{file|escape|nonempty }\n'}"
    default
    Build/DB/database.msbuild

However, when I use those same templates in changelogentry.tmpl (see previous e-mail), the resulting feed XML doesn't contain the branch name or file information.  I don't know why the templates would work at the command line but not in the atom styles from hgweb.


> > Also, I would prefer not to much with Mercurial's internal templates.
> > Is there a way to tell HgWeb to use a custom style when formatting the 
> > Atom feed?

> Yes, you just need to modify all the templates with atom links to point to your new 
> style. So no, not really. Maybe a version control tool would be handy here?

That's what I thought.  I just wanted to make sure there wasn't some extension/plugin point I didn't know about.



More information about the Mercurial mailing list