nirvdrum / svn2git

Ruby tool for importing existing svn projects into git.
MIT License
2.11k stars 443 forks source link

how to trouble shoot svb2git #321

Open cjohnshu opened 1 year ago

cjohnshu commented 1 year ago

I use ruby svn2git. I have the following error

F:\PRJ\dba>svn2git svn://localhost/ --prefix=svn/ --trunk / --nobranches --notags --authors dba_authors.txt D:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:58:in parse': undefined methodexists?' for File:Class (NoMethodError)

  if File.exists?(File.expand_path(DEFAULT_AUTHORS_FILE))
         ^^^^^^^^

Did you mean? exist? from D:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/svn2git-2.4.0/lib/svn2git/migration.rb:14:in initialize' from D:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/svn2git-2.4.0/bin/svn2git:26:innew' from D:/Ruby32-x64/lib/ruby/gems/3.2.0/gems/svn2git-2.4.0/bin/svn2git:26:in <top (required)>' from D:/Ruby32-x64/bin/svn2git:32:inload' from D:/Ruby32-x64/bin/svn2git:32:in `

'

cjohnshu commented 1 year ago

This version of svn2git should ignore method `exists?' but the migration.rb in this build still reference to it. Line 58 of migration.rb

if File.exists?(File.expand_path(DEFAULT_AUTHORS_FILE))

options[:authors] = DEFAULT_AUTHORS_FILE

end

MattIhnen commented 1 year ago

Same issue here, installed via gem. Looks like ruby removed the plural method exists in version 3.2.0, should use the singular File.exist? instead.

josh6025 commented 1 year ago

Same issue here, installed via gem. Looks like ruby removed the plural method exists in version 3.2.0, should use the singular File.exist? instead.

Thanks for that, I ended up downloading Ruby 3.1.4-1 and was able to continue without any issues.