Editing Cvs2svn

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
 
At the end of 2007, preparations to convert BRL-CAD's CVS repository to Subversion began.  The cvs2svn tool was used to perform the conversion, initially with version 1.5.1 but later using the latest available 2.0.1 version.  The page is provided for historic reference on how the repository was converted including the steps that were taken.
 
At the end of 2007, preparations to convert BRL-CAD's CVS repository to Subversion began.  The cvs2svn tool was used to perform the conversion, initially with version 1.5.1 but later using the latest available 2.0.1 version.  The page is provided for historic reference on how the repository was converted including the steps that were taken.
  
Using version 1.5.1, cvs2svn using all default options took over 7 hours of processing before it filled up available hard disk space (only 3GB was available at the time).  More space was made available and cvs2svn version 2.0.1 was installed, which provided a new more direct and faster method of extracting data from the CVS repository.  Using the same default options, version 2.0.1 took just under 3 hours.  The conversion was performed by Christopher Sean Morrison (aka brlcad).  The details of this conversion process are documented in following.
+
Using version 1.5.1, cvs2svn using all default options took over 7 hours of processing before it filled up available hard disk space (only 3GB was available at the time).  More space was made available and cvs2svn version 2.0.1 was installed, which provided a new more direct and faster method of extracting data from the CVS repository.  Using the same default options, version 2.0.1 took just under 3 hours.  The details of this conversion process are documented in following.
  
 
= CVS repository preparations =
 
= CVS repository preparations =
Line 26: Line 26:
 
Although not a critical issue as the svn:executable property can easily be set on files after they're imported into Subversion, there were problems with files that were properly set as executable in CVS not getting properly set in Subversion.  Some scripts got the setting while others did not, other files that CVS did not make executable upon checkout (like C source files) were getting marked as executable.  It seemed to be a mix of problems, some caused by inconsistent permissions set on the CVS root files and by unexpected cvs2svn behavior that is inconsistent with the behavior of CVS.
 
Although not a critical issue as the svn:executable property can easily be set on files after they're imported into Subversion, there were problems with files that were properly set as executable in CVS not getting properly set in Subversion.  Some scripts got the setting while others did not, other files that CVS did not make executable upon checkout (like C source files) were getting marked as executable.  It seemed to be a mix of problems, some caused by inconsistent permissions set on the CVS root files and by unexpected cvs2svn behavior that is inconsistent with the behavior of CVS.
  
There were indeed inconsistent permissions on the CVS root files that needed adjusting to make sure everything that should or should not be mode ugo+x had the appropriate bit setting.  With the repository repaired, attention was directed at the making sure the auto-props file also has the svn:executable property set on corresponding files.  Even with the auto-props carefully customized to list svn:executable for the files that should be executable, they still came across without the exec bit set.  In fact, it seemed the care and attention more categorically made all scripts files, for example, not have the executable properly set.  As the executable property is not critical, the files had the property set manually once the SVN repository went on-line.
+
There were indeed inconsistent permissions on the CVS root files that needed adjusting to make sure everything that should or should not be mode ugo+x had the appropriate bit setting.  With the repository repaired, attention was directed at the making sure the auto-props file also has the svn:executable property set on corresponding files.
 
 
UPDATE: Shortly after first posting this article, one of the cvs2svn developers (Michael Haggerty via IRC, thanks mhagger) contacted Sean regarding this write-up and the issues encountered with the BRL-CAD cvs2svn conversion.  He reviewed the config and input file settings and noted that the executable bit problems were directly the result of the auto-props file settings being used.  Contrary to SVN's behavior, cvs2svn interprets svn:executable as meaning '''''unset''' that property'' instead of setting it.  So, the file needed to have something like svn:executable=1 instead of just svn:executable to ensure the property was set.  This was at least the behavior as of version 2.0.1 of cvs2svn.  It was subsequently suggested that cvs2svn not diverge from SVN's behavior and instead allow a '''!'''svn:executable indicate the explicit ''unsetting'' of properties.
 
  
 
= Mime types =
 
= Mime types =
Line 225: Line 223:
 
= Automatic properties =
 
= Automatic properties =
  
UPDATE:  As noted above regarding the svn:executable property settings, the auto-props file shown below was found to be not what we wanted with respect to how cvs2svn handles property settings that don't list a value.  As of version 2.0.1, cvs2svn treats valueless auto-props property settings as an indicator that cvs2svn should explicitly '''unset''' the property instead of setting it.  As this behavior may be changed in future versions, consult the cvs2svn documentation.
+
The following auto-props file was used:
 
 
Regardless, the following auto-props file that was ultimately used for the BRL-CAD conversion is as follows:
 
  
 
<pre>
 
<pre>
Line 352: Line 348:
 
[A-Z._][A-Z._]*[A-Z._] = svn:eol-style=native;svn:mime-type=text/plain
 
[A-Z._][A-Z._]*[A-Z._] = svn:eol-style=native;svn:mime-type=text/plain
 
</pre>
 
</pre>
 
UPDATE: The auto-props shown above is shown for historic purposes only.  If you're looking for an up-to-date auto-props file to work with, you may want to try using [http://brlcad.org/~sean/subversion.config this one] from Sean instead.
 
  
 
= Results and statistics =
 
= Results and statistics =
Line 397: Line 391:
  
 
The result is a contiguous history of BRL-CAD development that has gone from RCS to CVS and now to SVN preserving more than 25 years of revision history.  The conversion was completed on January 10th, 2008.
 
The result is a contiguous history of BRL-CAD development that has gone from RCS to CVS and now to SVN preserving more than 25 years of revision history.  The conversion was completed on January 10th, 2008.
 
[[category:Historical documentation]]
 

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)