Class: PVN::Pct::LocalDiffer
- Defined in:
- lib/pvn/pct/local_differ.rb
Instance Method Summary collapse
Methods inherited from Differ
#initialize, #show_diff_counts
Constructor Details
This class inherits a constructor from PVN::Pct::Differ
Instance Method Details
#get_diff_counts(path, options) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/pvn/pct/local_differ.rb', line 11 def get_diff_counts path, elmt = PVN::IO::Element.new :local => path modified = elmt.find_modified_files total = PVN::DiffCount.new modified = modified.sort_by { |n| n.path } diff_counts = Array.new modified.each do |entry| info "entry.path: #{entry.path}" catcmd = SVNx::CatCommand.new entry.path svn_count = catcmd.execute.size local_count = Pathname.new(entry.path).readlines.size dc = PVN::DiffCount.new svn_count, local_count, entry.path diff_counts << dc end diff_counts end |