OS X Yosemite (10.10.3) + Xcode (6.3)にあげたらまたsvn-migration-scripts.jarでタグが移行できなくなった

原因はやっぱりGitのバージョン

  • 今回はOS XのGitがgit version 1.9.3 (Apple Git-50)からgit version 2.3.2 (Apple Git-55)になったことが原因だったので以前↓とは違う解決方法が必要となった。 gozuk16.hatenablog.com

  • タグの移行が出来ていない。

$ java -jar ../svn-migration-scripts.jar clean-git --force
# Creating annotated tags...
# Creating local branches...
Creating the local branch 'origin/tags/cvs2svn' for Subversion branch 'refs/remotes/origin/tags/cvs2svn'.
Creating the local branch 'origin/tags/hogehoge-1.0.0' for Subversion branch 'refs/remotes/origin/tags/hogehoge-1.0.0'.
Creating the local branch 'origin/trunk' for Subversion branch 'refs/remotes/origin/trunk'.
# Checking for obsolete tags...
No obsolete tags to remove.
# Checking for obsolete branches...
Deleting Git branch 'origin/tags/cvs2svn' not in Subversion.
Deleted branch origin/tags/cvs2svn (was 322c4b0).
Deleting Git branch 'origin/tags/hogehoge-1.0.0' not in Subversion.
Deleting Git branch 'origin/trunk' not in Subversion.
Deleted branch origin/trunk (was 4c1cd4e).
# Cleaning tag names
# Cleaning branch names

試したこと

  • Homebrewで入っていた1.9.2を使ってみた。→ NG
  • Homebrewで1.9.3を入れてみようとしてhomebrew-versionsとか試してみた。→ 欲しいバージョンを指定できず。
  • git-osx-installerというのを入れてみた。 → OK!

git-osx-installerのインストール

$ git svn
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level /usr/local/git/lib/perl5/site_perl/5.18.2 /usr/local/git/lib/perl5/site_perl /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/git/lib/perl5/site_perl/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/git/lib/perl5/site_perl/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/git/lib/perl5/site_perl/Git/SVN.pm line 26.
BEGIN failed--compilation aborted at /usr/local/git/lib/perl5/site_perl/Git/SVN.pm line 33.
Compilation failed in require at /usr/local/git/libexec/git-core/git-svn line 25.
BEGIN failed--compilation aborted at /usr/local/git/libexec/git-core/git-svn line 25.
  • ライブラリのリンクを貼る。
$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/SVN /System/Library/Perl/Extras/5.18/SVN
$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN/ /System/Library/Perl/Extras/5.18/auto/SVN

git svn cloneからやり直せばオッケー

  • 今度はタグも移行出来ました!
$ java -jar -Dfile.encoding=utf-8 ../svn-migration-scripts.jar clean-git  --force
# Creating annotated tags...
Creating annotated tag 'cvs2svn' at refs/remotes/tags/cvs2svn.
Creating annotated tag 'hogehoge-1.0.0' at refs/remotes/tags/hogehoge-1.0.0.
# Creating local branches...
# Checking for obsolete tags...
No obsolete tags to remove.
# Checking for obsolete branches...
No obsolete branches to remove.
# Cleaning tag names
# Cleaning branch names

$ git tag
cvs2svn
hogehoge-1.0.0

svn-migration-scripts.jar が最新のGitとSVNで動けばいいのに・・・。