[PATCH] hgweb: add inheritance support to style maps

Anton Shestakov engored at ya.ru
Wed Aug 17 23:52:11 EDT 2016


18.08.2016, 03:32, "Matt Mackall" <mpm at selenic.com>:
> # HG changeset patch
> # User Matt Mackall <mpm at selenic.com>
> # Date 1471459227 18000
> # Wed Aug 17 13:40:27 2016 -0500
> # Node ID f2bb8352d994be9bb9ca55d49dacba35c996d8cf
> # Parent 73ff159923c1f05899c27238409ca398342d9ae0
> hgweb: add inheritance support to style maps
>
> We can now specify a base map file:
>
> __base__ = path/to/map/file
>
> That map file will be read and used to populate unset elements of the
> current map. Unlike using %include, elements in the inherited class
> will be read relative to that path.
>
> This makes it much easier to make custom local tweaks to a style.

I like the idea, but I just don't find __base__ = <file> self-explanatory enough.

Why not something like %extend <file>? It would look on the same level of "special" as %include, which may help understanding what it does at a glance.


More information about the Mercurial-devel mailing list