[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] issue #890: Implementation of Custom keywords

From: Kimitake <kimitake_at_gmail.com>
Date: Tue, 21 Oct 2008 00:44:03 -0700

Hi Stefan,

Thanks for the comment.

I just tried to apply Peter's patch and quick tested it.
I used %I for replacing Id keyword, and it seems that it works,
but when I set $Id$ also after %I keyword, $Id$ is not expanded.

e.g. In "NetBSD=%I Id" case, $Id$ is not expanded.
e.g. In "Id NetBSD=%I" case, $Id$ and $NetBSD$ are expanded properly.

e.g. In NetBSD=%I Rev Date Author Id case, $NetBSD$ only works,
others are not expanded.

I will look into it and then send a patch later.


On Mon, Oct 20, 2008 at 7:08 AM, Stefan Sperling <stsp_at_elego.de> wrote:
> On Mon, Oct 20, 2008 at 06:25:48AM -0700, Kimitake wrote:
>> Hi subversion developers,
>> I just modified subst.c to support redefine keyword feature like GNU CVS.
>> To use this, add the following to property.
>> NetBSD=Id
>> This example is for NetBSD project, so $NetBSD$ keyword is replaced like
>> $Id$ one.
>> I have submitted this before, but recreated it with trunk.
> Issue link for those unaware of what's going on:
> http://subversion.tigris.org/issues/show_bug.cgi?id=890
> Kimitake, the patch is neat, but it only solves the case where you
> want to expand $Id$ under a different name.
> It would be nice to have a more configurable mechanism.
> Have you seen Peter Wemm's patch at
> http://people.freebsd.org/~peter/svn_keyword.diff ?
> Quoting the top of that patch:
> # This patch is an extension of patch in issue #860.
> # Instead of aliasing one keyword to another, and a big bug (only
> # supports aliasing to $Id$ anyway), this version allows
> # keyword_printf() format strings.
> # svn propset svn:keywords 'Foo=%b Bar=%r' file (expands $Foo: filename $, etc)
> # %I is an alias for $id$-like expansion. I've added %_ to insert a space.
> # eg: 'CustomId=%b%_Some%_Random%_String'. The svn:keywords parser doesn't
> # allow plain spaces.
> #
> # it adds to keyword_printf():
> # %P - $CVSHeader$ like repository-relative paths.
> # %_ - a space
> # %R - root of repository
> # and as aliases in the keyword builder:
> # %H - alias for $CVSHeader$ expansion. (%P %r %d %a)
> # %I - alias for $Id$ expansion. (%b %r %d %a)
> # the keyword builder aliases are because the svn:keyword splitter
> # uses spaces.
> I've asked Peter before whether he could formally submit the
> patch, but he didn't do that yet. Maybe you two could join forces,
> make Peter's patch ready for submission (bring up-to-date with trunk,
> double check and test, and write a log message -- which is missing
> from your current submission by the way) and submit it to this list?
> (See also http://subversion.tigris.org/hacking.html#patches)
> I realise that what I'm asking for is potentially a lot of work,
> but it would be nice if we had proper custom keywords with support
> for format strings, rather than just an alias for $Id$.
> Thanks,
> Stefan

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-21 09:44:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.