svn-command 0.2.12 → 0.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ProjectInfo.rb +5 -3
- data/Readme +1 -1
- data/lib/svn-command/subversion.rb +21 -7
- data/lib/svn-command/svn_command.rb +147 -50
- data/test/subversion_test.rb +5 -3
- data/test/svn_command_test.rb +3 -3
- metadata +5 -12
data/ProjectInfo.rb
CHANGED
@@ -5,7 +5,7 @@ module Project
|
|
5
5
|
PrettyName = "Enhanced Subversion Command"
|
6
6
|
Name = "svn-command"
|
7
7
|
RubyForgeName = "svn-command"
|
8
|
-
Version = "0.2.
|
8
|
+
Version = "0.2.15"
|
9
9
|
Specification = Gem::Specification.new do |s|
|
10
10
|
s.name = Project::Name
|
11
11
|
s.summary = "A nifty wrapper command for Subversion's command-line svn client"
|
@@ -18,7 +18,7 @@ module Project
|
|
18
18
|
s.homepage = "http://#{Project::RubyForgeName}.rubyforge.org/"
|
19
19
|
s.rubyforge_project = Project::Name
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
|
-
s.add_dependency("termios")
|
21
|
+
#s.add_dependency("termios") # No longer _required_, but highly recommended.
|
22
22
|
s.add_dependency("colored")
|
23
23
|
s.add_dependency("escape")
|
24
24
|
s.add_dependency("facets")
|
@@ -26,7 +26,9 @@ module Project
|
|
26
26
|
s.add_dependency("rscm")
|
27
27
|
s.post_install_message = <<-End
|
28
28
|
---------------------------------------------------------------------------------------------------
|
29
|
-
Please run sudo /usr/bin/_svn_command_post_install to finalize the installation.
|
29
|
+
IMPORTANT: Please run sudo /usr/bin/_svn_command_post_install to finalize the installation.
|
30
|
+
|
31
|
+
Also, it is highly recommended that you install the termios gem, but it will work without it.
|
30
32
|
---------------------------------------------------------------------------------------------------
|
31
33
|
End
|
32
34
|
|
data/Readme
CHANGED
@@ -16,13 +16,13 @@ This is a replacement <b><tt>svn</tt> command-line client</b> meant to be used i
|
|
16
16
|
|
17
17
|
=== Dependencies
|
18
18
|
|
19
|
-
* termios
|
20
19
|
* colored
|
21
20
|
* escape
|
22
21
|
* facets
|
23
22
|
* extensions
|
24
23
|
* qualitysmith_extensions
|
25
24
|
* rscm
|
25
|
+
* termios (recommended, but no longer required)
|
26
26
|
|
27
27
|
=== Installation: Once per _system_
|
28
28
|
|
@@ -69,16 +69,25 @@ module Subversion
|
|
69
69
|
raise NotImplementedError
|
70
70
|
end
|
71
71
|
|
72
|
-
# Adds the given
|
72
|
+
# Adds the given repository URL (http://svn.yourcompany.com/path/to/something) as an svn:externals.
|
73
73
|
#
|
74
74
|
# Options may include:
|
75
75
|
# * +:as+ - overrides the default behavior of naming the checkout based on the last component of the repo path
|
76
|
-
# * +:local_path+ - specifies where to set the externals property. Defaults to '
|
76
|
+
# * +:local_path+ - specifies where to set the externals property. Defaults to '.' or the dirname of +as+ if +as+ is specified
|
77
|
+
# (for example, <tt>vendor/plugins</tt> if +as+ is <tt>vendor/plugins/plugin_name</tt>).
|
77
78
|
#
|
78
79
|
def self.externalize(repo_url, options = {})
|
79
|
-
|
80
|
+
|
80
81
|
options[:as] ||= File.basename(repo_url)
|
81
|
-
options[:as] = options[:as].ljust(29)
|
82
|
+
#options[:as] = options[:as].ljust(29)
|
83
|
+
|
84
|
+
# You can't set the externals of './' to 'vendor/plugins/foo http://example.com/foo'
|
85
|
+
# Instead, you have to set the externals of 'vendor/plugins/' to 'foo http://example.com/foo'
|
86
|
+
# This will make that correction for you automatically.
|
87
|
+
options[:local_path] ||= File.dirname(options[:as]) # Will be '.' if options[:as] has no dirname component.
|
88
|
+
# Will be 'vendor/plugins' if options[:as] is 'vendor/plugins/plugin_name'.
|
89
|
+
options[:as] = File.basename(options[:as])
|
90
|
+
|
82
91
|
add_to_property 'externals', options[:local_path], "#{options[:as]} #{repo_url}"
|
83
92
|
end
|
84
93
|
|
@@ -208,6 +217,11 @@ module Subversion
|
|
208
217
|
DiffsParser.new(raw_diffs).parse
|
209
218
|
end
|
210
219
|
|
220
|
+
def self.cat(*args)
|
221
|
+
args = ['./'] if args.empty?
|
222
|
+
execute("cat #{args.join ' '}")
|
223
|
+
end
|
224
|
+
|
211
225
|
# It's easy to get/set properties, but less easy to add to a property. This method uses get/set to simulate add.
|
212
226
|
# It will uniquify lines, removing duplicates. (:todo: what if we want to set a property to have some duplicate lines?)
|
213
227
|
def self.add_to_property(property, path, *new_lines)
|
@@ -254,7 +268,7 @@ module Subversion
|
|
254
268
|
execute("proplist --revprop -r #{rev}")
|
255
269
|
end
|
256
270
|
# Returns an array of the names of all revision properties currently set on the given +rev+
|
257
|
-
#
|
271
|
+
# Tessted by: ../../test/subversion_test.rb:test_revision_properties_names
|
258
272
|
def self.revision_properties_names(rev)
|
259
273
|
raw_list = proplist(rev)
|
260
274
|
raw_list.scan(/^ +([^ ]+)$/).map { |matches|
|
@@ -262,7 +276,7 @@ module Subversion
|
|
262
276
|
}
|
263
277
|
end
|
264
278
|
# Returns an array of RevisionProperty objects (name, value) for revisions currently set on the given +rev+
|
265
|
-
#
|
279
|
+
# Tessted by: ../../test/subversion_test.rb:test_revision_properties
|
266
280
|
def self.revision_properties(rev)
|
267
281
|
revision_properties_names(rev).map { |property_name|
|
268
282
|
RevisionProperty.new(property_name, get_revision_property(property_name, rev))
|
@@ -502,7 +516,7 @@ module Subversion
|
|
502
516
|
[
|
503
517
|
entries_structs.map { |entry|
|
504
518
|
entry.name.size
|
505
|
-
}.max,
|
519
|
+
}.max.to_i,
|
506
520
|
25
|
507
521
|
].max
|
508
522
|
|
@@ -14,6 +14,7 @@ require 'facets/core/string/index_all'
|
|
14
14
|
require 'facets/core/string/to_re'
|
15
15
|
require 'facets/core/string/to_rx'
|
16
16
|
require 'facets/core/symbol/to_proc'
|
17
|
+
require 'facets/core/kernel/in'
|
17
18
|
|
18
19
|
gem 'qualitysmith_extensions', '>=0.0.3'
|
19
20
|
require 'qualitysmith_extensions/enumerable/enum'
|
@@ -27,8 +28,7 @@ require 'qualitysmith_extensions/module/attribute_accessors'
|
|
27
28
|
require 'English'
|
28
29
|
require 'pp'
|
29
30
|
require 'stringio'
|
30
|
-
|
31
|
-
require 'termios'
|
31
|
+
|
32
32
|
gem 'colored'
|
33
33
|
require 'colored' # Lets us do "a".white.bold instead of "\033[1ma\033[0m"
|
34
34
|
|
@@ -36,23 +36,33 @@ require_local '../../ProjectInfo'
|
|
36
36
|
require_local 'subversion'
|
37
37
|
require_local 'subversion_extensions'
|
38
38
|
|
39
|
+
|
39
40
|
begin
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
41
|
+
gem 'termios'
|
42
|
+
require 'termios'
|
43
|
+
begin
|
44
|
+
# Set up termios so that it returns immediately when you press a key.
|
45
|
+
# (http://blog.rezra.com/articles/2005/12/05/single-character-input)
|
46
|
+
t = Termios.tcgetattr(STDIN)
|
47
|
+
save_terminal_attributes = t.dup
|
48
|
+
t.lflag &= ~Termios::ICANON
|
49
|
+
Termios.tcsetattr(STDIN, 0, t)
|
50
|
+
|
51
|
+
# Set terminal_attributes back to how we found them...
|
52
|
+
at_exit { Termios.tcsetattr(STDIN, 0, save_terminal_attributes) }
|
53
|
+
rescue RuntimeError => exception # Necessary for automated testing.
|
54
|
+
if exception.message =~ /can't get terminal parameters/
|
55
|
+
puts 'Warning: Terminal not found.'
|
56
|
+
$interactive = false
|
57
|
+
else
|
58
|
+
raise
|
59
|
+
end
|
52
60
|
end
|
61
|
+
$termios_loaded = true
|
62
|
+
rescue Gem::LoadError
|
63
|
+
$termios_loaded = false
|
53
64
|
end
|
54
65
|
|
55
|
-
begin # Reset terminal_attributes
|
56
66
|
|
57
67
|
module Kernel
|
58
68
|
# Simply to allow us to override it
|
@@ -66,6 +76,29 @@ class Object
|
|
66
76
|
def nonnil?; !nil?; end
|
67
77
|
end
|
68
78
|
|
79
|
+
class IO
|
80
|
+
# Gets a single character, as a string.
|
81
|
+
# Adjusts for the different behavior of getc if we are using termios to get it to return immediately when you press a single key
|
82
|
+
# or if they are not using that behavior and thus have to press Enter after their single key.
|
83
|
+
def getch
|
84
|
+
response = getc
|
85
|
+
if !$termios_loaded
|
86
|
+
next_char = getc
|
87
|
+
new_line_characters_expected = ["\n"]
|
88
|
+
#new_line_characters_expected = ["\n", "\r"] if windows?
|
89
|
+
if next_char.chr.in?(new_line_characters_expected)
|
90
|
+
# Eat the newline character
|
91
|
+
else
|
92
|
+
# Don't eat it
|
93
|
+
# (This case is necessary, for escape sequences, for example, where they press only one key, but it produces multiple characters.)
|
94
|
+
$stdin.ungetc(next_char)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
response.chr
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
|
69
102
|
class String
|
70
103
|
# Makes the first character bold and underlined. Makes the whole string of the given color.
|
71
104
|
# :todo: Move out to extensions/console/menu_item
|
@@ -96,7 +129,7 @@ def confirm(question, options = ['Yes', 'No'])
|
|
96
129
|
" > "
|
97
130
|
response = ''
|
98
131
|
# Currently allow user to press Enter to accept the default.
|
99
|
-
response = $stdin.
|
132
|
+
response = $stdin.getch.downcase while !['y', 'n', "\n"].include?(begin response.downcase!; response end)
|
100
133
|
response
|
101
134
|
end
|
102
135
|
|
@@ -367,14 +400,13 @@ module Subversion
|
|
367
400
|
# http://svn.collab.net/repos/svn/trunk/doc/user/svn-best-practices.html:
|
368
401
|
# After every svn commit, your working copy has mixed revisions. The things you just committed are now at the HEAD revision, and everything else is at an older revision.
|
369
402
|
#puts "Whenever you commit something, strangely, your working copy becomes out of date (as you can observe if you run svn info and look at the revision number). This is a problem for svn log, and piston, to name two applications. So we will now update '#{(args.every + '/..').join(' ').white.bold}' just to make sure they're not out of date..."
|
370
|
-
print ''.bold # Clear the bold flag that svn annoyingly sets
|
371
|
-
working_copy_root = Subversion.working_copy_root(directory).to_s
|
403
|
+
#print ''.bold # Clear the bold flag that svn annoyingly sets
|
404
|
+
#working_copy_root = Subversion.working_copy_root(directory).to_s
|
372
405
|
#response = confirm("Do you want to update #{working_copy_root.bold} now? (Any key other than y to skip) ")
|
373
406
|
#if response == 'y'
|
374
|
-
puts "Updating #{working_copy_root}..."
|
407
|
+
#puts "Updating #{working_copy_root} (non-recursively)..."
|
375
408
|
#end
|
376
|
-
|
377
|
-
puts Subversion.update_lines_filter( Subversion.update(*args) )
|
409
|
+
#puts Subversion.update_lines_filter( Subversion.update(*args) )
|
378
410
|
end
|
379
411
|
|
380
412
|
# Ideas:
|
@@ -483,7 +515,6 @@ module Subversion
|
|
483
515
|
puts output.string
|
484
516
|
end
|
485
517
|
end unless @ignore_externals || @non_recursive
|
486
|
-
# :todo: or @non_recursive (but that's currently a passthrough option that doesn't set @non_recursive)
|
487
518
|
end
|
488
519
|
|
489
520
|
#-----------------------------------------------------------------------------------------------------------------------------
|
@@ -615,10 +646,6 @@ End
|
|
615
646
|
alias_method :_p, :__parents
|
616
647
|
end
|
617
648
|
|
618
|
-
# Unlike the built-in move, this one lets you list multiple source files
|
619
|
-
# Source... DestinationDir
|
620
|
-
# or
|
621
|
-
# Source Destination
|
622
649
|
def move(*args)
|
623
650
|
destination = args.pop
|
624
651
|
|
@@ -649,6 +676,13 @@ End
|
|
649
676
|
puts "Creating parent directory '#{destination_dir}'..."
|
650
677
|
self.mkdir destination_dir # @create_parents flag will be reused there
|
651
678
|
end
|
679
|
+
|
680
|
+
# Unlike the built-in move, this one lets you list multiple source files
|
681
|
+
# Source... DestinationDir
|
682
|
+
# or
|
683
|
+
# Source Destination
|
684
|
+
# Useful when you have a long list of files you want to move, such as when you are using wild-cards. Makes commands like this possible:
|
685
|
+
# svn mv source/* dest/
|
652
686
|
if args.length >= 2
|
653
687
|
sources = args
|
654
688
|
|
@@ -661,6 +695,39 @@ End
|
|
661
695
|
end
|
662
696
|
alias_subcommand :mv => :move
|
663
697
|
|
698
|
+
#-----------------------------------------------------------------------------------------------------------------------------
|
699
|
+
module Copy
|
700
|
+
Console::Command.pass_through({
|
701
|
+
[:_r, :__revision] => 1, # :todo: support "{" DATE "}" format
|
702
|
+
[:_q, :__quiet] => 0,
|
703
|
+
[:__force] => 0,
|
704
|
+
}.
|
705
|
+
merge(SvnCommand::C_standard_remote_command_options).
|
706
|
+
merge(SvnCommand::C_standard_commitable_command_options), self
|
707
|
+
)
|
708
|
+
end
|
709
|
+
|
710
|
+
def copy(*args)
|
711
|
+
destination = args.pop
|
712
|
+
|
713
|
+
# Unlike the built-in copy, this one lets you list multiple source files
|
714
|
+
# Source... DestinationDir
|
715
|
+
# or
|
716
|
+
# Source Destination
|
717
|
+
# Useful when you have a long list of files you want to copy, such as when you are using wild-cards. Makes commands like this possible:
|
718
|
+
# svn cp source/* dest/
|
719
|
+
if args.length >= 2
|
720
|
+
sources = args
|
721
|
+
|
722
|
+
sources.each do |source|
|
723
|
+
puts filtered_svn('copy', source, destination)
|
724
|
+
end
|
725
|
+
else
|
726
|
+
svn :exec, 'copy', *(args + [destination])
|
727
|
+
end
|
728
|
+
end
|
729
|
+
alias_subcommand :cp => :copy
|
730
|
+
|
664
731
|
#-----------------------------------------------------------------------------------------------------------------------------
|
665
732
|
module Import
|
666
733
|
Console::Command.pass_through({
|
@@ -710,17 +777,29 @@ End
|
|
710
777
|
def __ignore_externals; @ignore_externals = true; end
|
711
778
|
def __include_externals; @ignore_externals = false; end
|
712
779
|
def __with_externals; @ignore_externals = false; end
|
780
|
+
alias_method :_ie, :__ignore_externals
|
781
|
+
alias_method :_skip_externals, :__ignore_externals
|
713
782
|
|
714
783
|
def ignore_externals?
|
715
784
|
@ignore_externals.nonnil? ?
|
716
785
|
@ignore_externals :
|
717
786
|
(user_preferences['update'] && user_preferences['update']['ignore_externals'])
|
718
787
|
end
|
788
|
+
|
789
|
+
# Duplicated with Diff
|
790
|
+
def __non_recursive
|
791
|
+
@non_recursive = true
|
792
|
+
@passthrough_options << '--non-recursive'
|
793
|
+
end
|
794
|
+
alias_method :_N, :__non_recursive
|
795
|
+
|
719
796
|
end
|
720
797
|
|
721
798
|
def update(*args)
|
722
|
-
@passthrough_options << '--
|
723
|
-
|
799
|
+
@passthrough_options << '--ignore-externals' if ignore_externals?
|
800
|
+
Subversion.print_commands! do # Print the commands and options used so they can be reminded that they're using user_preferences['update']['ignore_externals']...
|
801
|
+
puts Subversion.update_lines_filter( Subversion.update(*prepare_args(args)) )
|
802
|
+
end
|
724
803
|
end
|
725
804
|
|
726
805
|
|
@@ -872,8 +951,7 @@ End
|
|
872
951
|
"or " + "any other key".white.bold + " to do nothing > "
|
873
952
|
)
|
874
953
|
response = ""
|
875
|
-
response = $stdin.
|
876
|
-
|
954
|
+
response = $stdin.getch.downcase # while !['a', 'd', 'i', "\n"].include?(begin response.downcase!; response end)
|
877
955
|
|
878
956
|
case response
|
879
957
|
when 'a'
|
@@ -890,7 +968,6 @@ End
|
|
890
968
|
response = "y"
|
891
969
|
end
|
892
970
|
|
893
|
-
puts "response=#{response}"
|
894
971
|
if response == 'y'
|
895
972
|
print "\nDeleting... "
|
896
973
|
FileUtils.rm_rf file
|
@@ -954,18 +1031,18 @@ End
|
|
954
1031
|
longest_path_name,
|
955
1032
|
entries_structs.map { |entry|
|
956
1033
|
entry.path.size
|
957
|
-
}.max
|
1034
|
+
}.max.to_i
|
958
1035
|
].max
|
959
1036
|
end
|
960
1037
|
end
|
961
1038
|
|
962
|
-
puts '(Use the -o/--omit-repository-path option if you just want the external paths/names without the repository paths)' unless @omit_repository_path
|
963
1039
|
puts externals_structs.map { |entries_structs|
|
964
1040
|
entries_structs.map { |entry|
|
965
1041
|
entry.path.ljust(longest_path_name + 1) +
|
966
1042
|
(@omit_repository_path ? '' : entry.repository_path)
|
967
1043
|
}
|
968
1044
|
}
|
1045
|
+
puts "(Tip: Also consider using svn externals_outline. Or use the -o/--omit-repository-path option if you just want a list of the paths that are externalled (without the repository URLs that they come from)".magenta unless @omit_repository_path
|
969
1046
|
end
|
970
1047
|
alias_subcommand :ei => :externals_items
|
971
1048
|
alias_subcommand :externals_list => :externals_items
|
@@ -1215,7 +1292,7 @@ End
|
|
1215
1292
|
# It's possible for a working copy to get "out of date" (even if you were the last committer!), in which case svn log will
|
1216
1293
|
# only list revisions up to that revision (actually looks like it only goes up to and including Last Changed Rev: 2838,
|
1217
1294
|
# not Revision: 2839, as reported by svn info...)
|
1218
|
-
if revision_of_directory < head
|
1295
|
+
if revision_of_directory and head and revision_of_directory < head
|
1219
1296
|
puts "The working copy '#{directory.white.bold}' appears to be out-of-date (#{revision_of_directory}) with respect to the head revision (#{head}). Updating..."
|
1220
1297
|
Subversion.update(directory)
|
1221
1298
|
end
|
@@ -1274,13 +1351,13 @@ End
|
|
1274
1351
|
# Get response from user and then act on it
|
1275
1352
|
begin # rescue
|
1276
1353
|
response = ""
|
1277
|
-
response = $stdin.
|
1354
|
+
response = $stdin.getch.downcase
|
1278
1355
|
|
1279
1356
|
# Escape sequence such as the up arrow key ("\e[A")
|
1280
1357
|
if response == "\e"
|
1281
|
-
response << (next_char = $stdin.
|
1358
|
+
response << (next_char = $stdin.getch)
|
1282
1359
|
if next_char == '['
|
1283
|
-
response << (next_char = $stdin.
|
1360
|
+
response << (next_char = $stdin.getch)
|
1284
1361
|
end
|
1285
1362
|
end
|
1286
1363
|
|
@@ -1311,8 +1388,11 @@ End
|
|
1311
1388
|
print 'Grep for'.bold + ' (Case sensitive; Regular expressions ' + 'like.*this'.bold.blue + ' allowed, but not ' + '/like.*this/im'.bold.blue + ') (backspace not currently supported): '
|
1312
1389
|
search_pattern = $stdin.gets.chomp.to_rx
|
1313
1390
|
puts((' '*100).green.underline)
|
1314
|
-
puts "Searching `svn diff #{revs_to_compare.min}:#{revs_to_compare.max}` for #{search_pattern.to_s}... ".bold
|
1315
|
-
diffs =
|
1391
|
+
puts "Searching `svn diff #{directory} -r #{revs_to_compare.min}:#{revs_to_compare.max}` for #{search_pattern.to_s}... ".bold
|
1392
|
+
diffs = nil
|
1393
|
+
Subversion.print_commands! do
|
1394
|
+
diffs = Subversion.diffs(directory, '-r', "#{revs_to_compare.min}:#{revs_to_compare.max}")
|
1395
|
+
end
|
1316
1396
|
|
1317
1397
|
hits = 0
|
1318
1398
|
diffs.each do |filename, diff|
|
@@ -1332,6 +1412,29 @@ End
|
|
1332
1412
|
end
|
1333
1413
|
show_revision_again = false
|
1334
1414
|
|
1415
|
+
when 'a' # Grep the cat
|
1416
|
+
puts
|
1417
|
+
print 'Grep for'.bold + ' (Case sensitive; Regular expressions ' + 'like.*this'.bold.blue + ' allowed, but not ' + '/like.*this/im'.bold.blue + ') (backspace not currently supported): '
|
1418
|
+
search_pattern = $stdin.gets.chomp.to_rx
|
1419
|
+
puts((' '*100).green.underline)
|
1420
|
+
puts "Searching `svn cat #{directory} -r #{rev}` for #{search_pattern.to_s}... ".bold
|
1421
|
+
contents = nil
|
1422
|
+
Subversion.print_commands! do
|
1423
|
+
contents = Subversion.cat(directory, '-r', rev)
|
1424
|
+
end
|
1425
|
+
|
1426
|
+
if contents =~ search_pattern
|
1427
|
+
puts( contents.grep(search_pattern). # This will get us just the interesting *lines* (as an array).
|
1428
|
+
map { |line| # Now, for each line...
|
1429
|
+
line.highlight_occurences(search_pattern)
|
1430
|
+
}
|
1431
|
+
)
|
1432
|
+
else
|
1433
|
+
puts "Search term not found!".red.bold
|
1434
|
+
end
|
1435
|
+
show_revision_again = false
|
1436
|
+
|
1437
|
+
|
1335
1438
|
when 'l' # List revision properties
|
1336
1439
|
puts
|
1337
1440
|
puts Subversion::printable_revision_properties(rev)
|
@@ -1354,12 +1457,11 @@ End
|
|
1354
1457
|
show_revision_again = false
|
1355
1458
|
|
1356
1459
|
when 'c' # Cat all files from revision
|
1357
|
-
puts
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
show_revision_again = false
|
1460
|
+
puts
|
1461
|
+
Subversion.print_commands! do
|
1462
|
+
puts Subversion.cat(directory, '-r', rev)
|
1463
|
+
end
|
1464
|
+
show_revision_again = true
|
1363
1465
|
|
1364
1466
|
when 'r' # Mark as reviewed
|
1365
1467
|
puts
|
@@ -1464,8 +1566,3 @@ End
|
|
1464
1566
|
end
|
1465
1567
|
end
|
1466
1568
|
end
|
1467
|
-
|
1468
|
-
ensure
|
1469
|
-
# Set terminal_attributes back to how we found them...
|
1470
|
-
Termios.tcsetattr(STDIN, 0, save_terminal_attributes)
|
1471
|
-
end
|
data/test/subversion_test.rb
CHANGED
@@ -21,10 +21,12 @@ class SubversionTest < Test::Unit::TestCase
|
|
21
21
|
Subversion.externalize('some/repo/path')
|
22
22
|
Subversion.externalize('some/repo/path', :as => 'foo')
|
23
23
|
Subversion.externalize('some/repo/path', :as => 'foo', :local_path => 'local/path')
|
24
|
+
Subversion.externalize('some/repo/path', :as => 'vendor/plugins/foo')
|
24
25
|
|
25
|
-
assert_equal "svn propset svn:externals '#{'path'
|
26
|
-
assert_equal "svn propset svn:externals '#{'foo'
|
27
|
-
assert_equal "svn propset svn:externals '#{'foo'
|
26
|
+
assert_equal "svn propset svn:externals '#{'path'} some/repo/path' .", Subversion.executed[1] # Used to be 'path'.ljust(29)
|
27
|
+
assert_equal "svn propset svn:externals '#{'foo'} some/repo/path' .", Subversion.executed[3]
|
28
|
+
assert_equal "svn propset svn:externals '#{'foo'} some/repo/path' local/path", Subversion.executed[5]
|
29
|
+
assert_equal "svn propset svn:externals '#{'foo'} some/repo/path' vendor/plugins", Subversion.executed[7]
|
28
30
|
end
|
29
31
|
|
30
32
|
def test_remove
|
data/test/svn_command_test.rb
CHANGED
@@ -232,7 +232,7 @@ end #class SvnStatusTest
|
|
232
232
|
class SvnUpdateTest < BaseSvnCommandTest
|
233
233
|
def test_1
|
234
234
|
capture_output { SvnCommand.execute("up -q file1 file2 -r 17") }
|
235
|
-
assert_equal "svn update -q -r 17
|
235
|
+
assert_equal "svn update -q -r 17 file1 file2", Subversion.executed[0]
|
236
236
|
end
|
237
237
|
end
|
238
238
|
|
@@ -382,8 +382,8 @@ class SvnExternalsTest < BaseSvnCommandTest
|
|
382
382
|
output = capture_output { SvnCommand.execute('externalize http://imaginethat.com/a/repo') }
|
383
383
|
assert_equal '', output
|
384
384
|
assert_equal [
|
385
|
-
"svn propget svn:externals
|
386
|
-
"svn propset svn:externals 'repo
|
385
|
+
"svn propget svn:externals .",
|
386
|
+
"svn propset svn:externals 'repo http://imaginethat.com/a/repo' ."
|
387
387
|
], Subversion.executed
|
388
388
|
end
|
389
389
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: svn-command
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.2.15
|
7
|
+
date: 2007-07-17 00:00:00 -07:00
|
8
8
|
summary: A nifty wrapper command for Subversion's command-line svn client
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -27,7 +27,9 @@ signing_key:
|
|
27
27
|
cert_chain:
|
28
28
|
post_install_message: |
|
29
29
|
---------------------------------------------------------------------------------------------------
|
30
|
-
Please run sudo /usr/bin/_svn_command_post_install to finalize the installation.
|
30
|
+
IMPORTANT: Please run sudo /usr/bin/_svn_command_post_install to finalize the installation.
|
31
|
+
|
32
|
+
Also, it is highly recommended that you install the termios gem, but it will work without it.
|
31
33
|
---------------------------------------------------------------------------------------------------
|
32
34
|
|
33
35
|
authors:
|
@@ -68,15 +70,6 @@ extensions: []
|
|
68
70
|
requirements: []
|
69
71
|
|
70
72
|
dependencies:
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: termios
|
73
|
-
version_requirement:
|
74
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
75
|
-
requirements:
|
76
|
-
- - ">"
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version: 0.0.0
|
79
|
-
version:
|
80
73
|
- !ruby/object:Gem::Dependency
|
81
74
|
name: colored
|
82
75
|
version_requirement:
|