[PATCH] hgweb: add inheritance support to style maps

Matt Mackall mpm at selenic.com
Thu Aug 18 14:04:05 EDT 2016


On Thu, 2016-08-18 at 17:48 +0900, Yuya Nishihara wrote:
> On Thu, 18 Aug 2016 11:52:11 +0800, Anton Shestakov wrote:
> > 
> > 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.
> It makes some sense because a mapfile value is <file>|'"' <string> '"'. But
> I'd rather change %include to behave like __base__.

That'll break anything that has learned from what coal is currently doing.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list