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

Re: How to create and apply tag in subversion

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 12 Mar 2009 13:30:35 -0400

Tags in Subversion are merely branches that are considered tags.

When you setup your repository, you normally have it setup one of two ways:

svn://repos/trunk/project1
svn://repos/trunk/project2
svn://repos/branches
svn://repos/tags
...

or

svn://repos/project1/trunk
svn://repos/project1/branches
svn://repos/project1/tags
svn://repos/project2/trunk
...

So, instead of copying svn://repos/project1/trunk to
svn://repos/proejct1/branches/FOO-1.1 to create a FOO-1.1 branch, you
copy svn://repos/project1/trunk to svn://repos/project1/tags/FOO-1.1
to create the FOO-1.1 tag.

Yeah, we're not thrilled about it either.

One of the problems is how do you prevent someone from modifying a
tag. It is too easy to checkout a tag, then make a modification and
commit that modification. Now, the next person who checks out the
FOO-1.1 tag won't get what was originally tagged as FOO-1.1, but the
modified FOO-1.1. And, this is actually quite easy to do without
thinking:

$svn co svn://repos/project1/FOO-1.1 project1 #Checking out FOO-1.1

Three days later....

$ cd project1 #I've got to fix a bug in project1
$ vi some/random/file
$ svn commit #Whoops! I just modified the tag FOO-1.1!

To handle this problem, you have to use a pre-commit trigger that
allows you to make a tag, but not modify a tag once it is created. I
believe the pre-commit Python hook allows you to specify the right to
add a new file or directory, but not let someone modify any files when
created. This can be used to allow tags to be created, but not
accidentally modified.

On Thu, Mar 12, 2009 at 3:41 AM, Irfan Sayed <irfu.sayed_at_gmail.com> wrote:
> Hi All,
>
> I have source code in subversion repository. Now i need to apply tag to this
> source code (all the files and dir.).
> Could you please let me know the step by step proc./command to achieve this.
>
> Please please help. it's urgent.
>
> Regards,
> Irfan.
>

-- 
--
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1313714
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-03-12 18:31:24 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.