tags:

views:

10051

answers:

4

I am creating my first project in subversion. So far I have

 branches 
 tags 
 trunk

I think I immediately need to make branches singular and start over. Update branches is the norm.

I have been doing work in trunk and moving the contents to tags as follows


    mkdir tags/1.0
    cp -rf trunk/* tags/1.0
    svn add tags/1.0
    svn commit -m " create a first tagged version"


My gut tells me this is totally wrong and I should maintain some relationship between the files using svn copy. The files I create in this way will have no relationship to each other and I am sure I will miss out on subversion features. Am I correct?

Should I use svn copy for the individual files?

    mkdir tags/1.0
    svn add tags/1.0
    svn copy trunk/file1 tags/1.0
    svn copy trunk/file2 tags/1.0
    svn copy trunk/file3 tags/1.0
    svn commit -m " create a first tagged version"

Should I use svn copy on the entire directory?

    svn copy cp -rf trunk tags/1.0
    svn commit -m " create a first tagged version"
+3  A: 

Could use Tortoise:

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-branchtag.html

Gromer
I am going to build a larger system on top of this so I need to focus on the core functions provided.
ojblass
+10  A: 

You are correct in that it's not "right" to add files to the tags folder.

You've correctly guessed that copy is the operation to use; it lets Subversion keep track of the history of these files, and also (I assume) store them much more efficiently.

In my experience, it's best to do copies ("snapshots") of entire projects, i.e. all files from the root check-out location. That way the snapshot can stand on its own, as a true representation of the entire project's state at a particular point in time.

This part of "the book" shows how the command is typically used.

unwind
Much thanks... any comment on the branches... branch renaming?
ojblass
+10  A: 

Just make

svn copy http://svn.example.com/project/trunk \
      http://svn.example.com/project/tags/1.0 -m "Release 1.0"
victor hugo
A: 

What if I use svn+ssh to access the repository. How the copy command in this case look like?

Truyen L