Migrated hosted repositories to that of another type.
Owner: Fedora Infrastructure Team
Contact: #fedora-admin, sysadmin-hosted
Servers: hosted1, hosted2
Purpose: Migrate hosted SCM repositories to that of another SCM.
fedorahosted.org can be used to host open source projects. Occasionally those projects want to change the SCM they utilize. This document provides documentation for doing so.
- An scm for maintaining the code. The currently supported scm's include Mercurial, Git, Bazaar, or SVN. Note: There is no cvs
- A trac instance, which provides a mini-wiki for hosting information and also provides a ticketing system.
- A mailing list
SVN to GIT migration
- Log into hosted1
- Make a temporary directory to convert the repos in
$ sudo mkdir /tmp/tmp-$PROJECTNAME.git
$ ce /tmp/tmp-$PROJECTNAME.git
- Create an git repo ready to receive migrated SVN data
$ sudo git-svn init http://svn.fedorahosted.org/svn/$PROJECTNAME --no-metadata
- Tell git to fetch and convert the repository:
$ git svn fetch
From here, you'll wanted to follow Creating a new git repo as if cloning an existing git repository to Fedorahosted.
After that process is done - kindly remove the temporary repo that was created
$ sudo rm -rf /tmp/tmp-$PROJECTNAME.git
Alternately, here's another way to do this (tmz):
[tmz@hosted1 tmp (master)]$ mkdir im-chooser-conversion && cd im-chooser-conversion [tmz@hosted1 im-chooser-conversion (master)]$ ~tmz/svn-to-git-authors im-chooser > authors [tmz@hosted1 im-chooser-conversion (master)]$ git svn clone -s -A authors --no-metadata file:///svn/im-chooser # Using file://$(pwd) here ensures that git copies all objects to the new bare repo. [tmz@hosted1 im-chooser-conversion (master)]$ git clone --bare --shared file://$(pwd)/im-chooser im-chooser.git
Questions left to be answered with this SOP
- Obviously we need to have requestor review the migration and confirm it's ok.
- Do we then delete the old SCM contents?
- Do we need to change the FAS-group type to grant them access to pull/push from it?