Home > Uncategorized > subversion-conventions-notes

subversion-conventions-notes

Moving to Subversion notes:

I have included my copy of the pragmatic programmers (PP) Subversion book. Everything I would suggest is covered well enough in this book and I will refer to pages in this. I have also attached the free svn red book from oreilly.

My assumption in these notes is that you haven’t used SVN or are familiar with its strategies. In perforce, you have been using a mainline strategy (as documented in the wiki). Subversion does not use this strategy. You will need to get familiar with its approach. PP p54 says:

“Developers should use branches to separate the main
line of development from code lines that have dif ferent
life cycles, such as release branches and major code
experiments. Tags are used to identify significant points
in time, including releases and bug fixes.”"

Access to the repository:

For read-only browsing access in a browser this will allow you to look at all the projects.

  • https://domain/svn/

For real work, checking out and committing with an SVN client:

  • https://domain/svn/project/trunk

SVN Clients:

  • TortoiseSVNGUI integration into explorer – http://tortoisesvn.net/downloads
  • AnkhSVN – integration into Visual Studio – http://ankhsvn.open.collab.net/
  • VisualSVN – integration into Visual Studio – http://www.visualsvn.com/visualsvn/
  • SVN commandline – http://subversion.tigris.org/getting.html#windows

Personally, I use tortoise and commandline and then also visual studio integration.

Checking out:

Everyone has their own naming conventions. Personally, when dealing with a trunk, I often check to a folder name with hyphen trunk in it. The name of the folder isn’t that important in the long run because it can be renamed.

 cd /path/to/src
 svn co https://domain/svn/project/trunk project-trunk

Committing:

svn commit -m "my check in" (PP p.91)

But, note that you will have already need to have added a file. GUI client will help with this.

Adding might look like this in the command line: svn add . (PP p.63)

Organising the repository

  1. There are also three folders for each project trunk, tags, branches (PP p.108)
  2. We will NOT be running a multiple project repository because we will be using multiple repositories when needed (PP p.110)
  3. Repositories can be linked via svn:externals when and if needed (PP p.135)

Using tags and branches

This is all covered in Chapter 9 (PP p.111) including creating release branches, fixing bugs, etc.

Naming conventions

My suggestion is to use PP conventions (p. 114)

Thing to Name     Name Style            Examples 
Release branch    RB-rel                RB-1.0 
                                        RB-1.0.1a 
Releases          REL-rel               REL-1.0 
                                        REL-1.0.1a 
Bug fix branches  BUG-track             BUG-3035 
                                        BUG-10871 
Pre-bug fix       PRE-track             PRE-3035 
                                        PRE-10871 
Post-bug fix      POST-track            POST-3035 
                                        POST-10871 
Developer experiments TRY-initials-desc TRY-MGM-cache-pages 
                                        TRY-MR-neo-persistence
Categories: Uncategorized Tags:
  1. No comments yet.
  1. No trackbacks yet.