Skip to content

Commit

Permalink
allow specifying of end revision in --revision option
Browse files Browse the repository at this point in the history
  • Loading branch information
dzuelke committed Jan 30, 2012
1 parent db07698 commit 1519057
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/svn2git/migration.rb
Expand Up @@ -101,7 +101,7 @@ def parse(args)
options[:nominimizeurl] = true
end

opts.on('--revision REV', 'Start importing from SVN revision') do |revision|
opts.on('--revision SREV[:EREV]', 'Start importing from SVN revision SREV; optionally end at EREV') do |revision|
options[:revision] = revision
end

Expand Down Expand Up @@ -181,7 +181,9 @@ def clone!
run_command("git config --local svn.authorsfile #{authors}") unless authors.nil?

cmd = "git svn fetch "
cmd += "-r #{revision}:HEAD " unless revision.nil?
range = revision.split(":") unless revision.nil?
range[1] = "HEAD" unless range[1]
cmd += "-r #{range[0]}:#{range[1]} " unless revision.nil?
unless exclude.empty?
# Add exclude paths to the command line; some versions of git support
# this for fetch only, later also for init.
Expand Down

0 comments on commit 1519057

Please sign in to comment.