Getting the actual svn to git migration was simple, but getting my RHEL 6 system to a state where I could run git-svn...phew that was a long hard trek.
The quickest way to get your system to a state where you can run svn to git migration would be to rely on https://www.atlassian.com/git/migration. Atlassian has a jar
svn-migration-scripts.jar.
Download that and run :
java -jar ~/svn-migration-scripts.jar verify
This will give you the delta between where your system is and where it should be in order to get the migration done.
Get the required version of Git and Subversion installed.
In my case I got the got the following installed.
- Git 1.8.4
- Subversion 1.7.16 or higher
Can't locate SVN/Core.pm.
Basically the subversion perl bindings are missing.
There are tons of blogs an resources on how to get that working.
None of it work perfectly for me. Finally what worked was:
PS: I had root permissions on this VM
- Install Perl 5.18.2 (My RHEL6 only had perl5 )
- Get the tar
- Untar and go through the README, and Chown -R root:root perl-5.18.2
- Run the configure command:
- ./Configure -des -prefix=/usr/local This will create a ./config.sh file in the same folder
- Run the ./config.sh file. this will generate the make file
- Run the following
- Make
- Make test
- Make install
- Perl 5.18.2 is now installed to /usr/local
- Set PERL5LIB to /usr/local/lib and export variable PERL5LIB
export PERL5LIB=/usr/local/lib
- The type
- cpan SVN::Core and wait for it to finish
- The find the location of git-svn
- find / -name git-svn
- vi git-svn and change the perl path to point to 5.18.2. perl and then save the change
- That was it, git-svn worked like a charm.
If these steps do not get you where you want to be, here are some of the resources that have various solutions to the same issue.
http://www.linuxquestions.org/questions/slackware-14/could-not-launch-git-svn-647625/
http://slackbuilds.org/repository/12.2/development/subversion-bindings/
http://git.661346.n2.nabble.com/subversion-perl-missing-td6831600.html
For me, adding yum repository, repoforge.org worked. It had required subversion and subversion-perl packages.
ReplyDeleteyum install --enablerepo=rpmforge-extras subversion subversion-perl