Adding Branch/Files Content in Atom Feed

Matt Mackall mpm at selenic.com
Tue Apr 1 23:43:22 UTC 2014


On Tue, 2014-04-01 at 23:03 +0000, Jensen, Aaron wrote:
> > 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.

I bet. There's no such symbol available in hgweb templates. See how it's
done in templates/gitweb/changelogentry.tmpl and map.

If that doesn't work, then you must be doing something wrong. We know it
works in other templates and there is no extra atom-magic that could
make this field stop working in the atom templates. Usual scenarios
include failure to fully restart webservers or failure to force-reload
webpages. 



-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list