Tutorial :SVN Versioning


Just a small SVN "problem" here.

I setup my own SVN server http://www.codinghorror.com/blog/archives/001093.html

Now I made a rep in which all my projects will go.

Now, I checked the rep out in a folder called "Projects".

Now If I make a project and check it in, that project is revision 1. If I make a second project, and check it in, that Project is at revision 2. Thus, if I make a change to Project 1, that project will then be at Revision 3.

What I would really want is for each project to have its own revision scheme. How do I do this?


You need to create repositories inside your "Projects" folder, and when you do the initial checkout, checkout "???/projects/repo1"... this will keep the working copies separate on your machine, and you will check in/out completely separately of each other.


The only way is to have each project in a completely separate repository. Items within the same repository will always exhibit the behavior you mentioned in your question.

From Here

Unlike those of many other version control systems, Subversion's revision numbers apply to entire trees, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change.


You have to create a separate repository for each project. This is in general a good idea anyways so no downside there :)


Can you describe why having a single subversion revision number across multiple projects is a problem for you?

There are some legitimate advantages to using a single repository for all of your projects. The biggest one being that you're probably better able to control changes between common code in multiple projects.

If you have a problem with the concept of a single incrementing subversion revision number across multiple projects now, have you considered the situation where you branch one of your projects? (remembering that a normal branch will also have a globally incrementing subversion revision number)

It sounds like you're trying to use the repository revision number as part of the build or release number? If that's the case perhaps you could consider implementing a different build numbering scheme for your project/s that can then be associated with the subversion revision number.

Such an association can be made by using a convention of creating branches with the release number and putting the subversion revision in the comment for the branch.

Some schemes were discussed in this question


They discuss it a little better here: http://www.nabble.com/Multiple-Repositories-in-a-Windows-Server-td15014106.html

Basically you can do:

svnserve -r /path/to/repository      svn://hostname/    


svnserve -r /path/to/directory/containing/many/repositories      svn://hostname/repositoryname/    

Alternately, you could go server'less and just host the individual repositories on a local or networked drive.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »