where to add local templates/styles

Steve Greenland steveg at moregruel.net
Fri Mar 28 16:46:11 CDT 2008


Goal: to be able to use custom named styles in the command line (not
web). For example, I want to invoke 'hg log --style myfoo', and have
it work *system wide*. I do NOT want to specify 'hg log --style
/etc/mercurial/templates/myfoo' - that's just unreasonable for common
use.

Where I am:

The command line option --style actually looks for a file named
map-cmdline.<style>. However, it only looks in directories "templates"
and "../templates" relative to the module install directory
(templater.templatepath). I've got an extremely strong aversion to
putting local files in the distribution's directories.

I can set the "style" value in the [ui] section to a particular file,
which gives a custom default.

What I think I need:

Either a way to expand the template search path, or a way to map a style
name to a style file. I've STFW, and I've STFL, and I've RTFM, but if
it's there, I've missed it. The '[web]' section supports a 'templates'
directory variable, but not '[ui]'.

Any ideas?

Thanks,
Steve
-- 
Steve Greenland
    The irony is that Bill Gates claims to be making a stable operating
    system and Linus Torvalds claims to be trying to take over the
    world.       -- seen on the net



More information about the Mercurial mailing list