class Churn::BzrAnalyzer

analizes Bzr / Bazaar SCM to find recently changed files, and what lines have been altered

Public Class Methods

supported?() click to toggle source
# File lib/churn/scm/bzr_analyzer.rb, line 6
def self.supported?
  !!(%xbzr nick 2>&1` && $?.success?)
end

Public Instance Methods

get_logs() click to toggle source
# File lib/churn/scm/bzr_analyzer.rb, line 10
def get_logs
  %xbzr log -v --short #{date_range}`.split("\n").reject{|line| line !~ /^[ ]*(M|A)  /}.map{|line| line.strip.split(" ")[1..-1]}.flatten
end
get_revisions() click to toggle source
# File lib/churn/scm/bzr_analyzer.rb, line 14
def get_revisions
  %xbzr log --line #{date_range}`.split("\n").map{|line| line[/^(\S+):/, 1] }
end