From 5778d3c51e1118f7202b07be74f000085b178c7f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Mon, 11 Apr 2011 04:18:55 +0000 Subject: [PATCH] scm: cvs: code clean up adapter. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5389 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/scm/adapters/cvs_adapter.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index d5f8e1c0a..d85c9e231 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -158,7 +158,6 @@ module Redmine def revisions(path=nil, identifier_from=nil, identifier_to=nil, options={}, &block) logger.debug " revisions path:" + "'#{path}',identifier_from #{identifier_from}, identifier_to #{identifier_to}" - path_with_project = "#{url}#{with_leading_slash(path)}" cmd_args = %w|rlog| cmd_args << "-d" << ">#{time_to_cvstime_rlog(identifier_from)}" if identifier_from @@ -212,8 +211,8 @@ module Redmine elsif state=="revision" if /^#{ENDLOG}/ =~ line || /^#{STARTLOG}/ =~ line if revision - revHelper=CvsRevisionHelper.new(revision) - revBranch="HEAD" + revHelper = CvsRevisionHelper.new(revision) + revBranch = "HEAD" branch_map.each() do |branch_name, branch_point| if revHelper.is_in_branch_with_symbol(branch_point) revBranch=branch_name @@ -237,19 +236,19 @@ module Redmine commit_log = String.new revision = nil if /^#{ENDLOG}/ =~ line - state="entry_start" + state = "entry_start" end next end if /^branches: (.+)$/ =~ line - #TODO: version.branch = $1 + # TODO: version.branch = $1 elsif /^revision (\d+(?:\.\d+)+).*$/ =~ line revision = $1 elsif /^date:\s+(\d+.\d+.\d+\s+\d+:\d+:\d+)/ =~ line - date = Time.parse($1) - author = /author: ([^;]+)/.match(line)[1] - file_state = /state: ([^;]+)/.match(line)[1] + date = Time.parse($1) + author = /author: ([^;]+)/.match(line)[1] + file_state = /state: ([^;]+)/.match(line)[1] # TODO: # linechanges only available in CVS.... # maybe a feature our SVN implementation. @@ -273,7 +272,8 @@ module Redmine end def diff(path, identifier_from, identifier_to=nil) - logger.debug " diff path:'#{path}',identifier_from #{identifier_from}, identifier_to #{identifier_to}" + logger.debug " diff path:'#{path}'" + + ",identifier_from #{identifier_from}, identifier_to #{identifier_to}" path_with_project="#{url}#{with_leading_slash(path)}" cmd = "#{self.class.sq_bin} -d #{shell_quote root_url} rdiff -u -r#{identifier_to} -r#{identifier_from} #{shell_quote path_with_project}" diff = [] -- 2.39.5