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 | + | 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 | + | 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 and Tcl files, for example, not have the exec bit set much to our chagrin. |
− | UPDATE: Shortly after first posting this article, | + | UPDATE: Shortly after first posting this article, we were contacted (via IRC, thanks Michael Haggerty) by one of the cvs2svn developers regarding this write-up and the issues we encountered with our conversion. He reviewed our config and input file settings and noted that our executable bit problems was directly the result of our auto-props file settings. Contrary to SVN's behavior, cvs2svn interprets svn:executable as meaning "unset that property" instead of setting it. So, we would have needed to have used something like svn:executable=1 to ensure the property was set. This was at least the behavior as of version 2.0.1 of cvs2svn. I made the suggestion to not diverge from SVN's behavior and instead allow a '''!'''svn:executable do the explicit ''unsetting'' of properties. |
= Mime types = | = Mime types = | ||
Line 225: | Line 225: | ||
= Automatic properties = | = Automatic properties = | ||
− | UPDATE: As noted above regarding the svn:executable property settings, the auto-props file shown below was | + | UPDATE: As noted above regarding the svn:executable property settings, the auto-props file shown below was determined to be wrong with respect to how cvs2svn handles property settings that don't list a value. At least as of version 2.0.1, cvs2svn treats non-quantified auto-props property settings as meaning that cvs2svn should explicitly '''unset''' the property instead of set it. Consult the documentation to see how the current cvs2svn behaves if you have a newer revision. |
− | Regardless, the following auto-props file | + | Regardless, the following auto-props file was what we used for the BRL-CAD conversion: |
<pre> | <pre> | ||
Line 352: | Line 352: | ||
[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> | ||
− | |||
− | |||
= Results and statistics = | = Results and statistics = | ||
Line 397: | Line 395: | ||
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. | ||
− | |||
− |