{"id":461,"date":"2011-08-04T11:18:33","date_gmt":"2011-08-04T16:18:33","guid":{"rendered":"http:\/\/otac.isa-geek.net\/blog\/?p=461"},"modified":"2011-08-04T11:18:33","modified_gmt":"2011-08-04T16:18:33","slug":"quick-start-version-control-with-subversion","status":"publish","type":"post","link":"https:\/\/otac.isa-geek.net\/blog\/?p=461","title":{"rendered":"Quick Start Version Control with Subversion"},"content":{"rendered":"<p>I recently decided to move all of my source code out of <a href=\"http:\/\/savannah.nongnu.org\/projects\/cvs\">CVS<\/a> into <a href=\"http:\/\/subversion.apache.org\/\">Subversion<\/a>: 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&#8217;s my quick start method for getting everything setup on my development machine.<\/p>\n<p>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\u00a0 Centre\u00a0 and see if Subversion was listed. I typed subversion in the search box, and sure enough, it was there:<\/p>\n<div id=\"attachment_462\" style=\"width: 160px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2011\/08\/Screenshot-Ubuntu-Software-Centre.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-462\" class=\"size-thumbnail wp-image-462\" title=\"Ubuntu Software Centre - subversion\" src=\"http:\/\/otac.isa-geek.net\/blog\/wp-content\/uploads\/2011\/08\/Screenshot-Ubuntu-Software-Centre-150x150.png\" alt=\"Ubuntu Software Centre - subversion\" width=\"150\" height=\"150\" \/><\/a><p id=\"caption-attachment-462\" class=\"wp-caption-text\">Ubuntu Software Centre - subversion<\/p><\/div>\n<p>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).<\/p>\n<p>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:<\/p>\n<p><strong>$ svnadmin create ~\/appdev\/SVNRepository<\/strong><\/p>\n<p>The next step was to edit the <em>~\/appdev\/SVNRepository\/conf\/svnserve.conf<\/em> file and enable the following lines :<\/p>\n<p><strong>[general]<br \/>\npassword-db = ******<br \/>\nrealm = Arawak Island Dev Repository<\/strong><\/p>\n<p>I then edited the file <em>~\/appdev\/SVNRepository\/conf<\/em><em>\/conf\/passwd<\/em> and add the following lines under the user stanza for my authentication against the repository:<\/p>\n<p><strong>[users]<br \/>\nduanecato=mypassword<\/strong><\/p>\n<p>Note that the passwords are <strong>NOT encrypted<\/strong> in any way.<\/p>\n<p>I started subversion against my repository using the following command:<\/p>\n<p><strong>$ svnserve -d -r<br \/>\n<\/strong><\/p>\n<p>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 <a href=\"http:\/\/cvs2svn.tigris.org\/\">cvs2svn<\/a>.<\/p>\n<p>First, I installed cvs2svn using apt-get:<\/p>\n<p><strong>$ sudo apt-get install cvs2svn<\/strong><\/p>\n<p>Then I followed the very simple instructions, using my CVS repository as source, and the new Subversion repository\u00a0 as target:<\/p>\n<p><strong>$ cvs2svn &#8211;existing-svnrepos <\/strong><strong>-s <strong>~\/appdev\/SVNRepository\/<\/strong><\/strong><strong> ~\/appdev\/CVSRepository<\/strong><\/p>\n<p><strong>&#8212;&#8211; pass 1 (CollectRevsPass) &#8212;&#8211;<br \/>\nExamining all CVS &#8216;,v&#8217; files&#8230;<br \/>\n\/home\/duanecato\/appdev\/CVSRepository\/Authentication.java,v<br \/>\n\/home\/duanecato\/appdev\/CVSRepository\/AuthenticationTest.java,v<\/strong><\/p>\n<p><strong> <\/strong><\/p>\n<p><strong>&#8230;.<\/strong><\/p>\n<p><strong>cvs2svn Statistics:<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nTotal CVS Files:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 92<br \/>\nTotal CVS Revisions:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 99<br \/>\nTotal CVS Branches:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nTotal CVS Tags:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 13<br \/>\nTotal Unique Tags:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 1<br \/>\nTotal Unique Branches:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0<br \/>\nCVS Repos Size in KB:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 199<br \/>\nTotal SVN Commits:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 16<br \/>\nFirst Revision Date:\u00a0\u00a0\u00a0 Fri Jun 16 00:37:12 2006<br \/>\nLast Revision Date:\u00a0\u00a0\u00a0\u00a0 Sun Jul 16 22:53:03 2006<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nTimings (seconds):<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n0.873\u00a0\u00a0 pass1\u00a0\u00a0\u00a0 CollectRevsPass<br \/>\n0.003\u00a0\u00a0 pass2\u00a0\u00a0\u00a0 CleanMetadataPass<br \/>\n0.002\u00a0\u00a0 pass3\u00a0\u00a0\u00a0 CollateSymbolsPass<br \/>\n0.017\u00a0\u00a0 pass4\u00a0\u00a0\u00a0 FilterSymbolsPass<br \/>\n0.093\u00a0\u00a0 pass5\u00a0\u00a0\u00a0 SortRevisionSummaryPass<br \/>\n0.004\u00a0\u00a0 pass6\u00a0\u00a0\u00a0 SortSymbolSummaryPass<br \/>\n0.008\u00a0\u00a0 pass7\u00a0\u00a0\u00a0 InitializeChangesetsPass<br \/>\n0.006\u00a0\u00a0 pass8\u00a0\u00a0\u00a0 BreakRevisionChangesetCyclesPass<br \/>\n0.006\u00a0\u00a0 pass9\u00a0\u00a0\u00a0 RevisionTopologicalSortPass<br \/>\n0.004\u00a0\u00a0 pass10\u00a0\u00a0 BreakSymbolChangesetCyclesPass<br \/>\n0.006\u00a0\u00a0 pass11\u00a0\u00a0 BreakAllChangesetCyclesPass<br \/>\n0.006\u00a0\u00a0 pass12\u00a0\u00a0 TopologicalSortPass<br \/>\n0.017\u00a0\u00a0 pass13\u00a0\u00a0 CreateRevsPass<br \/>\n0.004\u00a0\u00a0 pass14\u00a0\u00a0 SortSymbolsPass<br \/>\n0.003\u00a0\u00a0 pass15\u00a0\u00a0 IndexSymbolsPass<br \/>\n1.883\u00a0\u00a0 pass16\u00a0\u00a0 OutputPass<br \/>\n2.934\u00a0\u00a0 total<br \/>\n<\/strong>$<\/p>\n<p>A quick listing revealed all of my code now imported into the Subversion repository:<\/p>\n<p><strong> <\/strong><\/p>\n<p><strong>$ svn list &#8211;verbose file:\/\/\/home\/duanecato\/appdev\/SVNRepository\/<br \/>\n16 dcato\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Jul 16\u00a0 2006 .\/<br \/>\n1\u00a0 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Jun 16\u00a0 2006 branches\/<br \/>\n9\u00a0 ?\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Jul 06\u00a0 2006 tags\/<br \/>\n16 dcato\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Jul 16\u00a0 2006 trunk\/<\/strong><\/p>\n<p>With this confirmation, I was ready to start using Subversion for my future application development!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s my quick start method for getting everything setup on my development machine. Since I [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-461","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=461"}],"version-history":[{"count":5,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/461\/revisions"}],"predecessor-version":[{"id":467,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/461\/revisions\/467"}],"wp:attachment":[{"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/otac.isa-geek.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}