You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Peter Pentchev <ro...@ringlet.net> on 2006/02/11 19:44:02 UTC

[PATCH] Add keyword aliases during substitution

Hi,

Since I've transferred most of my local development to Subversion
repositores in the past year or so, there is only one thing that
I've missed from the CVS days - the ability to use a different
keyword to represent the Id tag, a keyword that is specific to
my repository, so it does not interfere with vendor-imported code
and such.  Examples of these may be found as the $FreeBSD$ tag in
the FreeBSD.org repository, the $XFree86$ tag in the, well, XFree86
development, and so on :)

I wonder if the following patch will be enough - I haven't played with
Subversion too deeply, especially with its language bindings... maybe
some changes will be needed there, too.  Also, this might kinda break
any code that still uses svn_subst_build_keywords() - I can't seem to
think of a way to represent aliased keywords in the old-style structure :(

Still, what do you think of this idea?

[[[
Enhance keyword substition: allow keyword aliases.

Enhance keyword substition: allow keyword aliases, defined as new=old in
the svn:keywords property.  Thus, if svn:keywords contains Ringlet=Id,
$Ringlet$ would be expanded as $Id$, while $Id$ would be left untouched.
Of course, if svn:keywords contains both Id and Ringlet=Id, both keywords
would be expanded.

Note that aliases may only be defined for "original" keywords; thus,
"Ringlet=Id More=Ringlet" would not expand $More$ at all.
]]]

G'luck,
Peter

-- 
Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
If this sentence were in Chinese, it would say something else.

Re: [PATCH] Add keyword aliases during substitution

Posted by Max Bowsher <ma...@ukf.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Branko Čibej wrote:
> Peter Pentchev wrote:
>> Hi,
>>
>> Since I've transferred most of my local development to Subversion
>> repositores in the past year or so, there is only one thing that
>> I've missed from the CVS days - the ability to use a different
>> keyword to represent the Id tag, a keyword that is specific to
>> my repository, so it does not interfere with vendor-imported code
>> and such.  Examples of these may be found as the $FreeBSD$ tag in
>> the FreeBSD.org repository, the $XFree86$ tag in the, well, XFree86
>> development, and so on :)
>>   
> [etc.]
> 
> Don't start from scratch. See
> 
>    http://subversion.tigris.org/issues/show_bug.cgi?id=890
> 
> The necessary infrastructure is now in the code. So someone has to start
> (or restart) a Custom Keywords design discussion.


How is this starting from scratch? It appears to be building on the
keywords-as-hash infrastructure already.


Given how complicated and ill-defined the concept of full custom
keywords is, it might be appropriate to implement the form Peter
suggests ahead of a some greater implementation.

Max.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)

iD8DBQFD9PBefFNSmcDyxYARAqgmAJ9B6LE4l3YTsMqqZG2ttrMwHjohWgCgp5p3
kHmS2AJhcr/ZvW5KyMOAiUU=
=Jt+0
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Add keyword aliases during substitution

Posted by Branko Čibej <br...@xbc.nu>.
Peter Pentchev wrote:
> Hi,
>
> Since I've transferred most of my local development to Subversion
> repositores in the past year or so, there is only one thing that
> I've missed from the CVS days - the ability to use a different
> keyword to represent the Id tag, a keyword that is specific to
> my repository, so it does not interfere with vendor-imported code
> and such.  Examples of these may be found as the $FreeBSD$ tag in
> the FreeBSD.org repository, the $XFree86$ tag in the, well, XFree86
> development, and so on :)
>   
[etc.]

Don't start from scratch. See

    http://subversion.tigris.org/issues/show_bug.cgi?id=890

The necessary infrastructure is now in the code. So someone has to start 
(or restart) a Custom Keywords design discussion.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org