I recently decided to move all of my source code out of CVS into Subversion: CVS is a getting bit long in the tooth, and Subversion really seems to have taken over as the feature-laden torch-bearer of the SCM world. Here’s my quick start method for getting everything setup on my development machine.

Since I do all of my development on a PC running 64-bit Linux 11.04 (Natty Narwhal), the first step was to bring up the Ubuntu Software  Centre  and see if Subversion was listed. I typed subversion in the search box, and sure enough, it was there:

Ubuntu Software Centre - subversion

Ubuntu Software Centre - subversion

I then clicked on the install button beside the subversion item, which installed subversion without any further prompting. For completeness, I also chose to install the RapidSVN subversion client (it was right under subversion).

The next step was to create a Subversion repository to hold all my code from my old CVS repository. From a command-line, I typed:

$ svnadmin create ~/appdev/SVNRepository

The next step was to edit the ~/appdev/SVNRepository/conf/svnserve.conf file and enable the following lines :

[general]
password-db = ******
realm = Arawak Island Dev Repository

I then edited the file ~/appdev/SVNRepository/conf/conf/passwd and add the following lines under the user stanza for my authentication against the repository:

[users]
duanecato=mypassword

Note that the passwords are NOT encrypted in any way.

I started subversion against my repository using the following command:

$ svnserve -d -r

I then had the task of importing all of my code from my CVS repository into the new subversion one. The simplest method seemed to be to simply check out the latest code from CVS and check it into SVN. Of course, this would lose my previous versions already stored in CVS. Doing a quick Google search, suggested using cvs2svn.

First, I installed cvs2svn using apt-get:

$ sudo apt-get install cvs2svn

Then I followed the very simple instructions, using my CVS repository as source, and the new Subversion repository  as target:

$ cvs2svn –existing-svnrepos -s ~/appdev/SVNRepository/ ~/appdev/CVSRepository

—– pass 1 (CollectRevsPass) —–
Examining all CVS ‘,v’ files…
/home/duanecato/appdev/CVSRepository/Authentication.java,v
/home/duanecato/appdev/CVSRepository/AuthenticationTest.java,v

….

cvs2svn Statistics:
——————
Total CVS Files:                92
Total CVS Revisions:            99
Total CVS Branches:              0
Total CVS Tags:                 13
Total Unique Tags:               1
Total Unique Branches:           0
CVS Repos Size in KB:          199
Total SVN Commits:              16
First Revision Date:    Fri Jun 16 00:37:12 2006
Last Revision Date:     Sun Jul 16 22:53:03 2006
——————
Timings (seconds):
——————
0.873   pass1    CollectRevsPass
0.003   pass2    CleanMetadataPass
0.002   pass3    CollateSymbolsPass
0.017   pass4    FilterSymbolsPass
0.093   pass5    SortRevisionSummaryPass
0.004   pass6    SortSymbolSummaryPass
0.008   pass7    InitializeChangesetsPass
0.006   pass8    BreakRevisionChangesetCyclesPass
0.006   pass9    RevisionTopologicalSortPass
0.004   pass10   BreakSymbolChangesetCyclesPass
0.006   pass11   BreakAllChangesetCyclesPass
0.006   pass12   TopologicalSortPass
0.017   pass13   CreateRevsPass
0.004   pass14   SortSymbolsPass
0.003   pass15   IndexSymbolsPass
1.883   pass16   OutputPass
2.934   total
$

A quick listing revealed all of my code now imported into the Subversion repository:

$ svn list –verbose file:///home/duanecato/appdev/SVNRepository/
16 dcato           Jul 16  2006 ./
1  ?                      Jun 16  2006 branches/
9  ?                     Jul 06  2006 tags/
16 dcato          Jul 16  2006 trunk/

With this confirmation, I was ready to start using Subversion for my future application development!

Like!
0