tags:

views:

176

answers:

2

Are Subversion Tags a good way to post to a development or staging server?

I envision this.

As the trunk becomes stable, a tag is created with that build. The development server switches to that tag utilizing Subversion, updating to the latest revision of files, deleting no longer needed files, etc. The server account I envision would also only have read only access to the repository.

Does this make sense? I am thinking of a way I can eliminate manual hand-copying files up to the development/staging/testing server.

Note: I am not using a build server so I don't need any hooks. Also, this is a Windows box.

A: 

Sure, it's a great idea. Check out Capistrano, it's a popular deployment tool that does basically what you have described. It's used primarily with Ruby on Rails, but it can be used in other environments.

Ken Liu
A: 

Subversion does not have real tags the way CVS does (http://svnbook.red-bean.com/en/1.1/ch04s06.html). However, you can tag using 'svn copy' which really makes a branch. Nonetheless, it is a best practice to release live (Deploy) from a version control system. You can get pretty fancy with stuff like Automated Deployment http://imrannazar.com/Automated-Deployment-with-Subversion.

One thing I would recommend is that you do a clean checkout of the code somewhere else first before doing a release to live. This way you will make sure everything is working and that everything got checked in.

My other recommendation is that you use 'svn export' instead of checkout. That way it removed all .svn directories and anything else not needed.

brianray
What do you mean that SVN doesn't have "real tags?" I've heard this before and have yet to hear it defended.
Jacob
@Jacob - SVN doesn't have an immutable tag or label like other systems. In other systems you can assign a name to a particular revision on a branch, but in svn all you can do is copy the trunk or a branch into the */tags* directory. The "tag" is only a tag in the sense that it is in the */tags* directory - it can still be updated, just like a branch.
Ken Liu