[PATCH 2 of 2] templaterfilters: add 'newline' filter

Matt Mackall mpm at selenic.com
Wed Jan 9 14:09:55 CST 2013


On Wed, 2013-01-09 at 12:12 -0600, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean.michael.farley at gmail.com>
> # Date 1357671975 21600
> # Node ID f8098885faa0fa09c8a9cfc887d807fa3c140cf4
> # Parent  e9a1700097f2e520b5b0773f902cb92fe7af99ae
> templaterfilters: add 'newline' filter

We've got things like if() and sub() now, so we shouldn't need to add
more special-purpose filters like this.

$ hg tip --template '{if(author, "{author}\n")}'
Matt Mackall <mpm at selenic.com>

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list