def run
folders = svn(:propget, '--recursive', Piston::ROOT, *args)
repos = Hash.new
repo = nil
folders.each_line do |line|
next unless line =~ /(\w.*) - /
repos[$1] = Hash.new
end
repo = nil
svn(:proplist, '--verbose', *repos.keys).each_line do |line|
case line
when /'([^']+)'/
repo = repos[$1]
when /(piston:[-\w]+)\s*:\s*(.*)$/
repo[$1] = $2
end
end
repos.each_pair do |path, props|
log = svn(:log, '--revision', "#{props[Piston::LOCAL_REV]}:HEAD", '--quiet', '--limit', '2', path)
props[:locally_modified] = 'M' if log.count("\n") > 3
end
repos.each_pair do |path, props|
log = svn(:log, '--revision', "#{props[Piston::REMOTE_REV]}:HEAD", '--quiet', '--limit', '2', props[Piston::ROOT])
props[:remotely_modified] = 'M' if log.count("\n") > 3
end if show_updates
repos.each_pair do |path, props|
logging_stream.printf "%1s%1s %5s %s (%s)\n", props[:locally_modified],
props[:remotely_modified], props[Piston::LOCKED], path, props[Piston::ROOT]
end
logging_stream.puts "No pistoned folders found" if repos.empty?
end