@@ -52,6 +52,7 @@ def parse(args)
52
52
options [ :exclude ] = [ ]
53
53
options [ :revision ] = nil
54
54
options [ :username ] = nil
55
+ options [ :password ] = nil
55
56
options [ :rebasebranch ] = false
56
57
57
58
if File . exists? ( File . expand_path ( DEFAULT_AUTHORS_FILE ) )
@@ -74,6 +75,10 @@ def parse(args)
74
75
options [ :username ] = username
75
76
end
76
77
78
+ opts . on ( '--password PASSWORD' , 'Password for transports that need it (http(s), svn)' ) do |password |
79
+ options [ :password ] = password
80
+ end
81
+
77
82
opts . on ( '--trunk TRUNK_PATH' , 'Subpath to trunk from repository URL (default: trunk)' ) do |trunk |
78
83
options [ :trunk ] = trunk
79
84
end
@@ -172,11 +177,13 @@ def clone!
172
177
exclude = @options [ :exclude ]
173
178
revision = @options [ :revision ]
174
179
username = @options [ :username ]
180
+ password = @options [ :password ]
175
181
176
182
if rootistrunk
177
183
# Non-standard repository layout. The repository root is effectively 'trunk.'
178
184
cmd = "git svn init --prefix=svn/ "
179
185
cmd += "--username=#{ username } " unless username . nil?
186
+ cmd += "--password=#{ password } " unless password . nil?
180
187
cmd += "--no-metadata " unless metadata
181
188
if nominimizeurl
182
189
cmd += "--no-minimize-url "
@@ -189,6 +196,7 @@ def clone!
189
196
190
197
# Add each component to the command that was passed as an argument.
191
198
cmd += "--username=#{ username } " unless username . nil?
199
+ cmd += "--password=#{ password } " unless password . nil?
192
200
cmd += "--no-metadata " unless metadata
193
201
if nominimizeurl
194
202
cmd += "--no-minimize-url "
0 commit comments