File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 28
28
29
29
@args . each_with_index do |arg , i |
30
30
case arg
31
- when "wait"
31
+ # Handle the old wait/nowait argument behavior
32
+ when "wait" , "nowait"
32
33
@wait_index = i
33
- when /--config-dir/
34
+ @actually_wait = ( arg == "wait" )
35
+ # An empty or absent config-dir means a default config-dir
36
+ when "--config-dir"
37
+ @configdir_index = i
38
+ # A defined config dir means a defined config-dir
39
+ when /--config-dir=(.*)?/
34
40
# Spaces in the directory should be fine since this whole thing is passed
35
41
# as a single argument via the multi-arg syntax for system() below.
36
42
# TODO: Test this spaces business. I don't buy it. -todb
43
+ @configdir = $1
37
44
@configdir_index = i
38
45
end
39
46
end
40
47
41
- @args . delete_at @wait_index if @wait_index
42
- @args . push ( "--config-dir=#{ @configdir } " ) unless @configdir_index
48
+ @args [ @wait_index ] = nil if @wait_index
49
+ @args [ @configdir_index ] = nil if @configdir_index
50
+ @args = @args . compact
51
+ @args . push ( "--config-dir=#{ @configdir } " )
43
52
@args . push ( "--non-interactive" )
44
53
45
54
res = system ( "svn" , "cleanup" )
54
63
system ( "svn" , "update" , *@args )
55
64
end
56
65
57
- if @wait_index
66
+ if @actually_wait
58
67
$stderr. puts ""
59
68
$stderr. puts "[*] Please hit enter to exit"
60
69
$stderr. puts ""
You can’t perform that action at this time.
0 commit comments