views:

670

answers:

8

Sorry, I'm new to SVN and I looked around a little for this. How do you mark a major version in SVN, kind of like set up a restore point. Right now I just setup my server and added all my files- I've been intermittently committing different changes. When I have something in a stable state is there a way to mark this so I can easily revert back to it if necessary?

+16  A: 

Sounds like you're looking for tags.

Tags in the Subversion book

"A tag is just a “snapshot” of a project in time"

David Precious
+2  A: 

Check tags

Einar
+10  A: 

The typical way is to create a 'tag' directory in the root of your repository and copy the entire trunk over to that directory. (Copying is cheap in Subversion because it's just adding references to specific revisions of existing files.)

So you might say:

svn cp http://svn.example.com/trunk/ http://svn.example.com/tags/major-revision-01/

See the Subversion book for more information, particularly the tags chapter.

Stephen Deken
A: 

try reading this page svn copy . Basically you just need to do a svn copy

sleep-er
+1  A: 

If you are using the svn standard structure you should have a branches, tags, and trunk folder.

What you are looking to do is to make a copy of the current trunk to a folder in tags.

Example command line:

svn copy mysvnurl/myproject/trunk mysvnurl/myproject/tags/majorrelease_01

Scott Bevington
A: 

In CVS, this was called a "tag". SVN doesn't use a separate mechanism for tags, it just creates a branch. So just create a new branch, and give it a descriptive name like "release-1.2".

Alternatively, the lazy way would be to write down the current repository revision number in a text file ;)

MrZebra
Holy crap, 4 more people answered in the time it took me to write that.
MrZebra
+3  A: 

All we do is we create a branch. We have the standard root level directories: trunk, tags, releases, branches.

The main thing to remember is that all branching is simply like creating a copy, and all branches off of the trunk are just like creating a copy (except that it is a shallow copy, only copying the deltas).

For us, all development is done in the trunk. If someone is doing a major rework then tend to put it in branches. Major releases are put into releases and all other labels and items we want to tag are put in the tags folder.

For our releases, we have the following directory structure:

repository
+--trunk
+--releases
  +--v1.0
  +--v1.1
  +--v1.4
  +--v2.0
+--branches
+--tags
Xetius
A: 

Here's another helpful idea. Use CruiseControl (or CruiseControl.NET) to automatically label at a fixed interval (i.e. nightly, or every 15 minutes)

Get A Build Process Now!

Sameer Alibhai