[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: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 20 Oct 2008 16:08:14 +0200

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-20 16:08:33 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.