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

Re: Once again: The $name$ keyword

From: Ryan Schmidt <tigris-2009_at_ryandesign.com>
Date: Tue, 27 Jan 2009 20:20:04 -0600

On Jan 19, 2009, at 08:53, postmaster_at_tigris.org wrote:

> Sorry if annoying you. I've searched for quite a long time for a
> solution to the missing "$name$" keyword in subversion. I could not
> find anything helpful.
> I would like to replace "$name$" keywords in my source code files
> by the "tag name" (by common convention, the first subfolder below
> "tags/"). I found the advice to write a piece of code in the
> corresponding file (e.g. if it is a javascript file, write a piece
> of javascript, etc.) which uses $URL$ and extracts the part of
> interest. This is absolutely no satisfying solution if the tag name
> should be replaced in dozens or hundreds of files in different
> languages or even plain text.
> I also found that there is no way to implement such a keyword using
> hooks (?)
> My last two hopes are:
> * Is this feature planned for a near-future release?
> * Is there some ready-to-use client wrapper, or whatever, which
> solves this issue?

I know of no plan to implement this or of any client-side wrapper or
other already-built solution for this.

A problem is that Subversion does not know what you mean by "tag
name" since tags are just a concept that humans understand;
Subversion itself assigns no special meaning to any of the
directories in your repository. The suggested directory names
"trunk", "branches" and "tags" are also just suggestions and not
everyone follows them.

The only existing solution I'm aware of is the one you say you don't
like: parse the $URL$ keyword instead. This suggestion should not be
so onerous, since you don't need to do this parsing for hundreds of
files; you just need to do it for one file, assuming all the files
you've checked out are from the same tag. If you are trying to
package up a tag and send it to someone who does not have Subversion,
then your packaging script can do this parsing of the $URL$ keyword
of one particular file and write the tag name to some other info file.

If that's not helpful, perhaps you could explain what the use case is
for wanting the tag name to appear in every file.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-28 03:33:29 CET

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

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