https://svn.lrde.epita.fr/svn/lrdetools/trunk
Index: ChangeLog
from Nicolas Pouillard <ertai(a)lrde.epita.fr>
Fix list, use a set for specific_options.
* vcs/lib/vcs/vcs.rb, vcs/lib/vcs/svn.rb: Use a set for
specific_options.
* vcs/lib/vcs/list.rb: Prefer a directory based algorithm for versioned
directories.
list.rb | 9 +++------
svn.rb | 2 +-
vcs.rb | 2 +-
3 files changed, 5 insertions(+), 8 deletions(-)
Index: vcs/lib/vcs/vcs.rb
--- vcs/lib/vcs/vcs.rb (revision 263)
+++ vcs/lib/vcs/vcs.rb (working copy)
@@ -54,7 +54,7 @@
:sign => true
)
@@output_io_methods ||= %w[ print puts putc ] # FIXME and so ...
- @@specific_options ||= []
+ @@specific_options ||= Set.new
@@user_defined_categories ||= [:precious, :unmask, :exclude, :junk]
@@symbol_category ||=
Index: vcs/lib/vcs/svn.rb
--- vcs/lib/vcs/svn.rb (revision 263)
+++ vcs/lib/vcs/svn.rb (working copy)
@@ -12,7 +12,7 @@
super
@@svn_option_controller ||=
OptionController.new(Svn, @@options_specification +
- Vcs.specific_options.join("\n"))
+ Vcs.specific_options.to_a.join("\n"))
self.option_controller = @@svn_option_controller
end
Index: vcs/lib/vcs/list.rb
--- vcs/lib/vcs/list.rb (revision 263)
+++ vcs/lib/vcs/list.rb (working copy)
@@ -36,18 +36,15 @@
files.each do |file|
file.to_path.find do |path|
Find.prune if path.to_s =~ /(\/|^)\.svn$/
- if (path.dirname + '.svn').exist?
if path.directory?
- if (path + '.svn').exist?
- next
+ if (path/'.svn').exist?
+ inside_versioned << path
else
+ outside_versioned << path
Find.prune
end
- end
- inside_versioned << path.to_s
else
outside_versioned << path
- Find.prune
end
end
end