Difference between revisions of "Subversion to Git Conversion: Notes on the Details"

From GlueXWiki
Jump to: navigation, search
(Created page with "The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06 <ol> <li>Delete the practice repositories on GitHub.</li> <li>Create a blan...")
 
Line 1: Line 1:
 +
==Subversion State at Conversion==
 +
 
The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06
 
The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06
  
 +
==The Procedure==
  
 
<ol>
 
<ol>
Line 12: Line 15:
 
<li>Add repositories to the list of those owned by the gluex team on GitHub.</li>
 
<li>Add repositories to the list of those owned by the gluex team on GitHub.</li>
 
</ol>
 
</ol>
The sim-recon conversion with svn2git took about 8 hours. hdds took about 20 hours
+
The sim-recon conversion with svn2git took about 8 hours. Hdds took about 20 hours.
 +
 
 +
==Command Syntax==
 +
 
 +
The magic command to convert from subversion to git:
 +
 
 +
<code>cd /path/to/conversion<br/>
 +
svn2git https://halldsvn.jlab.org/repos --no-minimize-url -v --trunk trunk/sim-recon --branches branches --tags tags</code>
 +
 
 +
To prepare local repository for import to GitHub:
 +
 
 +
<code>cd /path/to/clone<br/>
 +
git clone --bare file:///path/to/conversion</code>
 +
 
 +
To do the import, from the local host:
 +
 
 +
<code>cd /path/to/clone/conversion.git
 +
git push --mirror https://github.com/jeffersonlab/sim-recon.git</code>

Revision as of 11:36, 20 July 2015

Subversion State at Conversion

The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06

The Procedure

  1. Delete the practice repositories on GitHub.
  2. Create a blank repository to receive the converted repository on GitHub.
  3. Make a copy of the complete Subversion repository on the local disk with rsync.
  4. Use svn2git to do the conversion using the local-disk-resident version of the Subversion repository.
  5. In the resulting git repository, delete branches and tags not related to the package, as well as all "@revision" branches and tags.
  6. Clone a bare copy of the repository (--bare option).
  7. Push the bare copy to the GitHub repository with the --mirror option.
  8. Add repositories to the list of those owned by the gluex team on GitHub.

The sim-recon conversion with svn2git took about 8 hours. Hdds took about 20 hours.

Command Syntax

The magic command to convert from subversion to git:

cd /path/to/conversion
svn2git https://halldsvn.jlab.org/repos --no-minimize-url -v --trunk trunk/sim-recon --branches branches --tags tags

To prepare local repository for import to GitHub:

cd /path/to/clone
git clone --bare file:///path/to/conversion

To do the import, from the local host:

cd /path/to/clone/conversion.git git push --mirror https://github.com/jeffersonlab/sim-recon.git