Difference between revisions of "Subversion to Git Conversion: Notes on the Details"
From GlueXWiki
(→Prepare Translation of Author Information) |
(→Prepare Translation of Author Information) |
||
Line 10: | Line 10: | ||
* Used an "authors" file in /home/marki/.svn2git as described in README. | * Used an "authors" file in /home/marki/.svn2git as described in README. | ||
− | * Wrote script [https://gist.github.com/markito3/a1865019f9d600f8e897#file-user_list_svn_convert-pl user_list_svn_convert.pl] to extract all usernames in the "halld" group at JLab and put them into the "authors" file. Creates email address by appending "@jlab.org" in '''all''' cases. | + | * Wrote script [https://gist.github.com/markito3/a1865019f9d600f8e897#file-user_list_svn_convert-pl user_list_svn_convert.pl] to extract all usernames in the "halld" group at JLab and put them into the "authors" file. Creates email address by appending "@jlab.org" in '''all''' cases. If any authors are missing in the file, svn2git will exit and report the error. |
==Subversion State at Conversion== | ==Subversion State at Conversion== |
Revision as of 10:42, 6 August 2015
Main reference: svn2git README file, hereafter referred to as README.
Contents
Preliminaries
Install svn2git
Follow instructions in README.
Prepare Translation of Author Information
- Used an "authors" file in /home/marki/.svn2git as described in README.
- Wrote script user_list_svn_convert.pl to extract all usernames in the "halld" group at JLab and put them into the "authors" file. Creates email address by appending "@jlab.org" in all cases. If any authors are missing in the file, svn2git will exit and report the error.
Subversion State at Conversion
The last revision in the Subversion repository before conversion: Rev 19042 2015-07-15 17:35:06
The Procedure
- Delete the practice repositories on GitHub.
- Create a blank repository to receive the converted repository on GitHub.
- Make a copy of the complete Subversion repository on the local disk with rsync.
- Use svn2git to do the conversion using the local-disk-resident version of the Subversion repository.
- In the resulting git repository, delete branches and tags not related to the package, as well as all "@revision" branches and tags.
- Clone a bare copy of the repository (--bare option).
- Push the bare copy to the GitHub repository with the --mirror option.
- 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