tags:

views:

72

answers:

3

Given the following scenario

Start off with this structure:

Trunk\blah\
Tag\

I branch Trunk into Tag. Now I have

Trunk\blah\
Tag\Version 1\blah\

I branch my newly created tag again. Now I have:

Trunk\blah\
Tag\Version 1\blah\
Tag\Version 2\blah\

I make a change to blah in Version 2 and commit. Can I merge that change back into Trunk\blah directly? IE can I skip the chain of branches and keep Version 1 as it was when tagged.

+2  A: 

Yes. Because branching in svn is just a shallow copy, there's nothing magic about it.

But make sure when you merge back in (ie copy the changes) that the revision range is from the start of Version 1 to the end of Version 2.

The thing to bear in mind about svn merging is that you're specifying a set of changes to apply to a tree.

therefromhere
+4  A: 

Yes. In Subversion you can even merge completely unrelated paths.

BTW, the common convention is to use a /tags directory for tags - branches which are never modified. Branches which are kept for making fixes on are usually placed in a /branches directory.

Avi
+2  A: 

Yes you can.

Although, this would not be good practice. A tag is basically a snapshot in time. You should not be making edits to a tag.

I think you actually want to "branch" instead of tag, especially since you are using the word "branch" in your description.

Here is a nice article about branching: http://svnbook.red-bean.com/en/1.0/ch04s02.html

Kevin Crowell