Class: Churn::SvnAnalyzer

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

Overview

analizes SVN 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_from_log, #initialize, set_source_control

Constructor Details

This class inherits a constructor from Churn::SourceControl

Class Method Details

.supported?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/churn/scm/svn_analyzer.rb', line 6

def self.supported?
  File.exist?(".svn")
end

Instance Method Details

#generate_history(starting_point) ⇒ Object



14
15
16
# File 'lib/churn/scm/svn_analyzer.rb', line 14

def generate_history(starting_point)
  raise "currently the generate history option does not support subversion"
end

#get_logsObject



10
11
12
# File 'lib/churn/scm/svn_analyzer.rb', line 10

def get_logs
  `svn log --verbose#{date_range}#{svn_credentials}`.split(/\n/).map { |line| clean_up_svn_line(line) }.compact
end

#get_revisionsObject

below 2 methods aren’t supported by SVN so they become noops



19
20
21
# File 'lib/churn/scm/svn_analyzer.rb', line 19

def get_revisions
  []
end

#get_updated_files_change_info(revision, revisions) ⇒ Object



23
24
25
# File 'lib/churn/scm/svn_analyzer.rb', line 23

def get_updated_files_change_info(revision, revisions)
  {}
end