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

Re: Use wildcard in name of tag??

From: Ron Wilson <ronw.mrmx_at_gmail.com>
Date: Fri, 1 Jul 2011 11:47:59 -0400

On Fri, Jul 1, 2011 at 10:03 AM, <suprasupra_at_fastmail.fm> wrote:
> I want do create a tag. And the name of the tag should look like this:
> <projet_name>_V1.3.456789
>
> The "456789" should be the svn revision from the new created tag. Is
> thsi possible? I think, the problem is, that the revision isnĀ“t known
> until the tag is created.

True, the version is not known before the commit.

Short of getting an enhancement into SVN, the best you can do is to
create a tag by cloning the version you are tagging and naming it
using the version you are cloning. (see:
http://svnbook.red-bean.com/en/1.1/ch04s06.html)

Although the version number of tag will not be the same as the version
of what you are taging, the content will be identical (in fact, SVN
clones are cheap; they merely reference what they are a clone of)

This could be done automatically in a post-commit hook, but you would
probably need some way to indicate you want this to be done.

However, if what you are looking for is merely a way to auto-generate
release numbers, you could use a script that maintains a "release.h"
file and creates the tag.

(my script, as written, requires CygWin be installed, so you can run
Bash scripts)

svn lock release.h
gawk "$2 ~ /RELEASE_NUM/ { $3 = $3 + 1; } { print > out; }"
out=release release.h
mv release release.h
svn commit release.h
RELEASE=`gawk "$@ ` /RELEASE_NUM/ { print $3 }"`
svn copy //server/repo/trunk //server/repo/tags/Release-1.$RELEASE

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2782114

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-01 17:48:04 CEST

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

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