make CVS dirs work too

This commit is contained in:
Ward Wouts 2007-07-24 21:11:27 +00:00
parent db63966873
commit 24c26f957f

View file

@ -108,6 +108,27 @@ def svnparse(url)
}
end
def cvsparse(url)
puts "\n#{url}"
begin
body = fetch("#{url}/CVS/Entries").body
rescue
end
dirs = Array.new
body.each{|line|
case line
when /^D\/?(.*?)\/.*/ then
puts "#{$1}/"
dirs.push($1)
when /^\/(.*?)\/(.*?)\/(.*?)\/.*/ then
puts "#{$1} #{$2} #{$3}"
end
}
dirs.each{|dir|
cvsparse("#{url}/#{dir}")
}
end
options = cmdline
if options["-u"].nil?
usage