Method: RIM::StatusBuilder#rev_status

Defined in:
lib/rim/status_builder.rb

#rev_status(git_session, rev) ⇒ Object

status object for single revision rev without status of ancestors



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/rim/status_builder.rb', line 55

def rev_status(git_session, rev)
  mod_dirs = module_dirs(git_session, rev)
  mod_stats = []
  # export all relevant modules at once

  # this makes status calculation significantly faster compared

  # to exporting each module separately 

  # (e.g. 1.0s instead of 1.5s on linux for a commit with 20 modules)

  git_session.within_exported_rev(rev, mod_dirs) do |d|
    mod_dirs.each do |rel_path|
      mod_stats << build_module_status(d, d+"/"+rel_path)
    end
  end
  stat = RevStatus.new(mod_stats)
  stat.git_rev = git_session.rev_sha1(rev)
  stat
end