By running:
$ svn log —stop-on-copy http://svn.eu.apache.org/repos/asf/commons/proper/bcel
We know that starting revision 1149512 it was moved from “jakarta” to “commons/proper”.
By running:
$ svn log —stop-on-copy http://svn.eu.apache.org/repos/asf/jakarta/bcel@1149511
We learn that the 1st commit was at revision 152684.
We can also open the URL http://svn.eu.apache.org/repos/asf/!svn/bc/1149511/jakarta/bcel to check that revision
$ mkdir apache-commons-bcel $ cd apache-commons-bcel $ git svn init --stdlayout --no-minimize-url http://svn.eu.apache.org/repos/asf/commons/proper/bcel $ git svn init --stdlayout --no-minimize-url -R old http://svn.eu.apache.org/repos/asf/jakarta/bcel $ vi .git/config
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [svn-remote "svn"] url = http://svn.eu.apache.org/repos/asf/commons/proper/bcel fetch = trunk:refs/remotes/svn/trunk branches = branches/*:refs/remotes/svn/* tags = tags/*:refs/remotes/svn/tags/* [svn-remote "old"] url = http://svn.eu.apache.org/repos/asf/jakarta/bcel fetch = trunk:refs/remotes/svn/old branches = branches/*:refs/remotes/svn/* tags = tags/*:refs/remotes/svn/tags/*
$ git svn fetch -R old -r 152684:1149511 $ git svn fetch -r 1149512:HEAD
$ git branch -f master remotes/trunk $ git checkout master $ for branch in `git branch -a|grep remotes/svn/|sed 's|remotes/svn/||'`; do git branch $branch remotes/svn/$branch; done
$ git rebase old
Do some correction to use the file
$ vi doap_bcel.rdf
Keep the Apache Commons lines.
$ git add .
$ git rebase —continue
$ su gitolite -c “cp -R .git /var/lib/gitolite/repositories/j2ee/apache-commons-bcel.git”
$ su gitolite -c “git config —git-dir=/var/lib/gitolite/repositories/j2ee/apache-commons-bcel.git —bool core.bare true”
Change the committer dates to match the author dates:
$ git filter-branch —env-filter ‘GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE; export GIT_COMMITTER_DATE’
$ cd apache-commons-bcel.git $ git branch -m master master-old $ git branch master trunk $ git config receive.denyDeleteCurrent ignore $ git symbolic-ref HEAD refs/heads/master $ git branch -D master-old $ git config receive.denyDeleteCurrent ignore
As the gitolite user:
$ cd ~/repositories/apache-commons-bcel.git
$ git svn fetch
$ for branch in `git branch -a|grep remotes/svn/|sed ‘s|remotes/svn/||’`; do git branch $branch remotes/svn/$branch; done
$ git checkout trunk $ git pull $ git chekout master $ git merge trunk