lib/churn/churn_calculator.rb in churn-0.0.13 vs lib/churn/churn_calculator.rb in churn-0.0.14
- old
+ new
@@ -8,10 +8,11 @@
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'source_control'
require 'git_analyzer'
require 'svn_analyzer'
require 'hg_analyzer'
+require 'bzr_analyzer'
require 'location_mapping'
require 'churn_history'
module Churn
@@ -132,18 +133,24 @@
def self.hg?
system("hg branch")
end
+ def self.bzr?
+ system("bzr nick")
+ end
+
def set_source_control(start_date)
if self.class.git?
GitAnalyzer.new(start_date)
elsif self.class.hg?
HgAnalyzer.new(start_date)
+ elsif self.class.bzr?
+ BzrAnalyzer.new(start_date)
elsif File.exist?(".svn")
SvnAnalyzer.new(start_date)
else
- raise "Churning requires a subversion or git repo"
+ raise "Churning requires a bazaar, git, mercurial, or subversion repo"
end
end
def calculate_revision_changes
@revisions.each do |revision|