Class: Churn::BzrAnalyzer
- Inherits:
-
SourceControl
- Object
- SourceControl
- Churn::BzrAnalyzer
- Defined in:
- lib/churn/scm/bzr_analyzer.rb
Overview
analizes Bzr / Bazaar SCM to find recently changed files, and what lines have been altered
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SourceControl
#get_updated_files_change_info, #get_updated_files_from_log, #initialize, set_source_control
Constructor Details
This class inherits a constructor from Churn::SourceControl
Class Method Details
.supported? ⇒ Boolean
6 7 8 |
# File 'lib/churn/scm/bzr_analyzer.rb', line 6 def self.supported? !!(`bzr nick 2>&1` && $?.success?) end |
Instance Method Details
#get_logs ⇒ Object
10 11 12 |
# File 'lib/churn/scm/bzr_analyzer.rb', line 10 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_revisions ⇒ Object
14 15 16 |
# File 'lib/churn/scm/bzr_analyzer.rb', line 14 def get_revisions `bzr log --line #{date_range}`.split("\n").map{|line| line[/^(\S+):/, 1] } end |