I migrated language-detection’s repository on Google Code Project from subversion into git.
It is because its directory layout must be changed much for maven-support . (I HATE the branching of subversion! :D)
Google Code Project supports subversion, git and Mercurial as Version Control System. Each repository is independent and exclusive, and it is necessary to migrate between them by manual.
So I wrote migration process from subversion into git as step-bt-step.
1. Prepare git and git-svn
I used them on Cygwin. But I reckon it is easier on Linux 😀
2. Migrate into local git repositories
At first, migrate the subversion repository into local git repositories (because of their exclusiveness).
The subversion repository of Google Code Project has histories of not only codes(trunk/branch/tag) but also wikis. In the case of git, codes and wikis are stored in each repository.
So you need to migrate 2 repositories if you didn’t use branches/tagges
Execute the below commands on an appropriate directory.
$ cd your-working-directory $ git svn clone -s http://your-project-name.googlecode.com/svn/ $ git svn clone http://your-project-name.googlecode.com/svn/wiki/
“your-working-directory” and “your-project-name” must be replaced into your suitable names. It matters that the second command does not has -s option.
If you use branches and tagges, then you might need several steps for tagging on the git repository, but I didn’t research its methods because I didn’t use them 😛
If you run into an error like the below with git-svn on Cygwin (it may often occur at Windows 7 x64???),
10192702 [main] perl 9904 C:\cygwin\bin\perl.exe: *** fatal error - unable to re map C:\cygwin\bin\cygsvn_client-1-0.dll to same address as parent: 0xAB0000 != 0xAE0000
then execute rebaseall on cmd.exe as the below.
$ cd c:\cygwin\bin $ ash rebaseall -v
3. Switch the project’s VCS into git
Switching into git is available at the source tab on the administrator’s console of the project.
The operation does not affect no inference to the subversion repository, but limit the only selected system to access. So you can restore the subversion at any time.
4. Push the local repositories into new ones
Execute the below commands.
$ cd svn $ git push https://code.google.com/p/your-project-name/ master $ cd .. $ cd wiki $ git push https://code.google.com/p/your-project-name.wiki/ master
Then the git repositories will be available. You shoud check whether the project’s wiki is as before.
I like that the repositories of codes and wikis are separeted.
– http://d.hatena.ne.jp/kkobayashi_a/20090615/p1 (in Japanese)