[PATCH 0 of 2] keyword: 2 more date filters, alternate svn-like default keywordmaps

Christian Ebert blacktrash at gmx.net
Wed Feb 10 05:24:31 CST 2010


* Christian Ebert on Wednesday, February 10, 2010 at 10:14:04 +0100
> This patch series introduces svn-like keywords as alternate
> default keywordmaps at the price of a new config section
> [keywordstyle].
> 
> As with cvs-like defaults they are turned off when manually
> configured keywordmaps are detected (minimize risk of inadvertent
> expansion, speed).
> 
> The first patch implements 2 additional date filters to obtain
> the date formats needed.
> 
> If this is considered useful it would be nice if someone with
> more svn experience could compare with
> http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html
> Quick testing can be done with:
> hg --config keywordstyle.svn=1 kwdemo --default

Oh, could have provided an example:

$ hg -q --config keywordstyle.svn=1 kwdemo -d
[extensions]
keyword = 
[keyword]
demo.txt = 
[keywordmaps]
Author = {author|user}
Date = {date|svnisodate}
Id = {file|basename},v {node|short} {date|svnutcdate} {author|user}
LastChangedBy = {author|user}
LastChangedDate = {date|svnisodate}
LastChangedRevision = {node|short}
Revision = {node|short}
$Author: blacktrash $
$Date: 2010-02-10 12:23:43 +0100 (Wed, 10 Feb 2010) $
$Id: demo.txt,v bf9d8a809b2b 2010-02-10 11:23:43Z blacktrash $
$LastChangedBy: blacktrash $
$LastChangedDate: 2010-02-10 12:23:43 +0100 (Wed, 10 Feb 2010) $
$LastChangedRevision: bf9d8a809b2b $
$Revision: bf9d8a809b2b $
 
> In this proposal switching to svn keywordstyle turns on the
> alternate keywords:
> 
> LastChangedBy
> LastChangedDate
> LastChangedRevision
> 
> Turning these on could be done in an extra keywordstyle like
> "svnfull". Personally I'd rather not for simplicity's sake.
> With the additional datefilters in place it can be done manually
> (as the functionality of the second patch could).
> 
> HeadURL/URL is not supported because I don't think it makes sense
> within Mercurial. It still can be configured manually if a user
> wishes to use that keyword.
-- 
_B A U S T E L L E N_ lesen! --->> http://www.blacktrash.org/baustellen/


More information about the Mercurial-devel mailing list