Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a73de8

Browse files
author
François Rey
committed
Added --no-minimize-url option, same as git-svn option
1 parent fe8d38b commit 5a73de8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/svn2git/migration.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def parse(args)
3737
options = {}
3838
options[:verbose] = false
3939
options[:metadata] = false
40+
options[:nominimizeurl] = false
4041
options[:rootistrunk] = false
4142
options[:trunk] = 'trunk'
4243
options[:branches] = 'branches'
@@ -89,6 +90,10 @@ def parse(args)
8990
options[:tags] = nil
9091
end
9192

93+
opts.on('--no-minimize-url', 'Accept URLs as-is without attempting to connect to a higher level directory') do
94+
options[:nominimizeurl] = true
95+
end
96+
9297
opts.on('-m', '--metadata', 'Include metadata in git logs (git-svn-id)') do
9398
options[:metadata] = true
9499
end
@@ -126,6 +131,7 @@ def clone!
126131
branches = @options[:branches]
127132
tags = @options[:tags]
128133
metadata = @options[:metadata]
134+
nominimizeurl = @options[:nominimizeurl]
129135
rootistrunk = @options[:rootistrunk]
130136
authors = @options[:authors]
131137
exclude = @options[:exclude]
@@ -134,6 +140,9 @@ def clone!
134140
# Non-standard repository layout. The repository root is effectively 'trunk.'
135141
cmd = "git svn init "
136142
cmd += "--no-metadata " unless metadata
143+
if nominimizeurl
144+
cmd += "--no-minimize-url "
145+
end
137146
cmd += "--trunk=#{@url}"
138147
run_command(cmd)
139148

@@ -142,6 +151,9 @@ def clone!
142151

143152
# Add each component to the command that was passed as an argument.
144153
cmd += "--no-metadata " unless metadata
154+
if nominimizeurl
155+
cmd += "--no-minimize-url "
156+
end
145157
cmd += "--trunk=#{trunk} " unless trunk.nil?
146158
cmd += "--tags=#{tags} " unless tags.nil?
147159
cmd += "--branches=#{branches} " unless branches.nil?

0 commit comments

Comments
 (0)