You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Eramo, Mark" <me...@hbs.edu> on 2010/07/09 16:04:26 UTC

Promting files from trunk to a specific tag

I have a question.

In CVS, if I made changes to some files in the trunk, I could promote those into a specific tag. Is it possible to do the same in SVN?

I have a few files in the trunk that I want to promote to an existing tag without creating a new tag. Just curious if this is possible and how it is done.

Regards,
Mark


Re: Promting files from trunk to a specific tag

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 9, 2010, at 11:49, Les Mikesell wrote:
> On 7/9/2010 11:04 AM, Eramo, Mark wrote:
>> 
>> In CVS, if I made changes to some files in the trunk, I could promote
>> those into a specific tag. Is it possible to do the same in SVN?
>> 
>> I have a few files in the trunk that I want to promote to an existing
>> tag without creating a new tag. Just curious if this is possible and how
>> it is done.
> 
> The concept of a tag is somewhat different between cvs and subversion so you probably want to reconsider what you are trying to accomplish at a higher level.  In cvs a tag is basically a label associated with a file/revision and you need them to group a set together because there is no other way to do it.  In subversion a tag is a 'cheap' copy that is generally only needed to give a human-friendly name instead remembering the path/revision where it was copied from.  You can assemble grouping that don't appear elsewhere into tags, but by convention they normally aren't updated.  So for your last question about modifying an existing tag, yes it is possible but it is not the usual way to do things.  Tags are usually snapshot copies that aren't modified after creation.

You may also want to read the chapter in the Subversion book for CVS users

http://svnbook.red-bean.com/nightly/en/svn.forcvs.html

Especially:

http://svnbook.red-bean.com/nightly/en/svn.forcvs.branches-and-tags.html

Re: Promting files from trunk to a specific tag

Posted by Les Mikesell <le...@gmail.com>.
On 7/9/2010 11:04 AM, Eramo, Mark wrote:
> I have a question.
>
> In CVS, if I made changes to some files in the trunk, I could promote
> those into a specific tag. Is it possible to do the same in SVN?
>
> I have a few files in the trunk that I want to promote to an existing
> tag without creating a new tag. Just curious if this is possible and how
> it is done.

The concept of a tag is somewhat different between cvs and subversion so 
you probably want to reconsider what you are trying to accomplish at a 
higher level.  In cvs a tag is basically a label associated with a 
file/revision and you need them to group a set together because there is 
no other way to do it.  In subversion a tag is a 'cheap' copy that is 
generally only needed to give a human-friendly name instead remembering 
the path/revision where it was copied from.  You can assemble grouping 
that don't appear elsewhere into tags, but by convention they normally 
aren't updated.  So for your last question about modifying an existing 
tag, yes it is possible but it is not the usual way to do things.  Tags 
are usually snapshot copies that aren't modified after creation.

-- 
   Les Mikesell
     lesmikesell@gmail.com


Re: Promting files from trunk to a specific tag

Posted by David Weintraub <qa...@gmail.com>.
Normally, you don't want to change a tag. A tag should be a snapshot
to a particular version of your repository. However, some people have
a tag liked BLESSED or APPROVED to mark their code. I'm not a fan of
that, but if you do, there is no reason why you cannot just copy the
files you want to "tag" to the tag directory you want to mark them in.

At least in Subversion, unlike CVS, you retain a history how the tag
was changed.

Remember in Subversion, a tag is just another directory. You normally
copy a tree structure to it, but there is nothing preventing you from
copying a mix of files, or modifying what is in the tag by copying new
versions of individual files into the tag.

In fact, it's one of the problems since it is way too easy to change
it without meaning to. I have a pre-commit hook that prevents this
from happening.

On Fri, Jul 9, 2010 at 11:04 AM, Eramo, Mark <me...@hbs.edu> wrote:
> I have a question.
>
>
>
> In CVS, if I made changes to some files in the trunk, I could promote those
> into a specific tag. Is it possible to do the same in SVN?
>
>
>
> I have a few files in the trunk that I want to promote to an existing tag
> without creating a new tag. Just curious if this is possible and how it is
> done.
>
>
>
> Regards,
>
> Mark
>
>



-- 
David Weintraub
qazwart@gmail.com