Class: Churn::BzrAnalyzer

Inherits:
SourceControl show all
Defined in:
lib/churn/bzr_analyzer.rb

Overview

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

Instance Method Summary collapse

Methods inherited from SourceControl

#get_updated_files_change_info, #get_updated_files_from_log, #initialize

Constructor Details

This class inherits a constructor from Churn::SourceControl

Instance Method Details

#get_logsObject



5
6
7
# File 'lib/churn/bzr_analyzer.rb', line 5

def get_logs
  `bzr log -v --short #{date_range}`.split("\n").reject{|line| line !~ /^[ ]*(M|A)  /}.map{|line| line.strip.split(" ")[1..-1]}.flatten
end

#get_revisionsObject



9
10
11
# File 'lib/churn/bzr_analyzer.rb', line 9

def get_revisions
  `bzr log --line #{date_range}`.split("\n").map{|line| line[/^(\S+):/, 1] }
end