Note: This work is now complete, and is kept here for reference purposes only.
Current localtion in svn:
Each spec project has it's own trunk directory under "trunk". Tags for all specs releases are under the "tags" directory and use the name "<project-name>-<version>"
For example the trunk for the EJB 3.1 spec is located here:
And the tag for the 1.0.0.Final release is here:
Git repositories do not normally contain more than one project, and tags can only be applied to an entire repository (not to a single path in the repository like svn). So the specs projects should be divided into a separate git repository for each spec version.
The git-svn tool can be used to migrate an svn repository to git, however, there are some limitations regarding how git-svn converts svn tags into git tags. There is no simple way to select only certain tags from the svn "tags" directory to be imported into Git tags. So the tag conversion should be done manually.
Create Git Repo - A Git repository needs to be created and pushed to Github
Needs Tags - The history has been pushed to github, but the tags still need to be created
Complete - The migration is complete
Will Not Migrate - The project will not be migrated to git
? - Requires some discussion before migration
|jboss-connector-api_1.5_spec||Complete||Merged with con 1.6|
|jboss-ejb-api_3.0_spec||Complete||Merged with ejb 3.1|
|jboss-jacc-api_1.1_spec||Complete||Merged with jacc 1.4|
|jboss-javaee6-specs-bom||Complete||Merged with jboss-javaee-6.0|
|jboss-javaee6-web-specs-bom||Will Not Migrate|
|jboss-specs-parent||Will Not Migrate|
Create a local authors file containing a list of the svn authors and their associated email addresses. The contents of the file can be found in docspace (https://docspace.corp.redhat.com/docs/DOC-43448) . The file can be saved as svn_authors.txt. Then configure git to use this as the default authors file.
git config --global svn.authorsfile=~/svn_authors.txt
During the next step, you may find that some userids are missing. This file contains some additional user ids:
Step 1 - Choose a project
Choose a spec project to migrate. For example, the JBoss Annotations API 1.1. Change to the directory where you want the new git repository, then use git-svn clone to pull the trunk history from svn. Use the based URL for the jbossas svn repo, and a relative path to the project trunk directory. Note, this step might take several hours.
cd ~/projects/jboss-specs git svn clone --trunk projects/specs/trunk/jboss-annotations-api_1.1_spec/ http://anonsvn.jboss.org/repos/jbossas jboss-annotations-api_1.1_spec
Step 2 - Create the git tags
This is a somewhat manual process because git tags work differently than svn tags.
For each tag in svn, get the rev id of the commit on which the tag is based. This normally means the commit immediately before the tag commit.
svn log -l 2 http://anonsvn.jboss.org/repos/jbossas/projects/specs/tags/jboss-annotations-api_1.1_spec-1.0.0.Beta1/
Find the git commit which contains the svn rev id.
git log --grep 101915
Create a git tag with the appropriate version on that commit.
git tag -a "1.0.0.Beta1" -m "1.0.0.Beta1" b6d1210101b3ab104ea435d0b4b5a397263c07a5
The tag message can just be the version string.
Repeat these steps for each svn tag.
When all the tags have been created in the new git repo, review the history using "gitk" and see that it looks correct.
Step 3 - Publish the new repo
Push the repo to github
git push --tags origin master