Note: This work is now complete, and is kept here for reference purposes only.
Background Info
Current localtion in svn:
https://svn.jboss.org/repos/jbossas/projects/specs/
http://anonsvn.jboss.org/repos/jbossas/projects/specs/
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:
https://svn.jboss.org/repos/jbossas/projects/specs/trunk/jboss-ejb-api_3.1_spec/
And the tag for the 1.0.0.Final release is here:
https://svn.jboss.org/repos/jbossas/projects/specs/tags/jboss-ejb-api_3.1_spec-1.0.0.Final/
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.
Current Status
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
Spec | Status | Notes |
---|---|---|
jboss-annotations-api_1.1_spec | Complete | |
jboss-connector-api_1.5_spec | Complete | Merged with con 1.6 |
jboss-connector-api_1.6_spec | Complete | |
jboss-ejb-api_3.0_spec | Complete | Merged with ejb 3.1 |
jboss-ejb-api_3.1_spec | Complete | |
jboss-el-api_2.2_spec | Complete | |
jboss-interceptors-api_1.1_spec | Complete | |
jboss-j2eemgmt-api_1.1_spec | Complete | |
jboss-jacc-api_1.1_spec | Complete | Merged with jacc 1.4 |
jboss-jacc-api_1.4_spec | Complete | |
jboss-jad-api_1.2_spec | Complete | |
jboss-jaspi-api_1.0_spec | Complete | |
jboss-javaee-6.0 | Complete | |
jboss-javaee-web-6.0 | Complete | |
jboss-javaee6-specs-bom | Complete | Merged with jboss-javaee-6.0 |
jboss-javaee6-web-specs-bom | Will Not Migrate | |
jboss-jaxb-api_2.2_spec | Complete | |
jboss-jaxr-api_1.0_spec | Complete | |
jboss-jaxrpc-api_1.1_spec | Complete | |
jboss-jaxrs-api_1.1_spec | Complete | |
jboss-jaxws-api_2.2_spec | Complete | |
jboss-jms-api_1.1_spec | Complete | |
jboss-jsf-api_2.0_spec | Complete | |
jboss-jsp-api_2.2_spec | Complete | |
jboss-jstl-api_1.2_spec | Complete | |
jboss-rmi-api_1.0_spec | Complete | |
jboss-saaj-api_1.3_spec | Complete | |
jboss-servlet-api_3.0_spec | Complete | |
jboss-specs-parent | Will Not Migrate | |
jboss-transaction-api_1.1_spec | Complete |
Migration Process
Setup
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:
https://svn.jboss.org/repos/jbossas/trunk/build/docs/copyright.txt
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
Comments