summaryrefslogtreecommitdiffstats
path: root/lib/redmine/scm/adapters/cvs_adapter.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-13 11:54:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-13 11:54:06 +0000
commit12c856124b6b968d55053f413a406b97b4423160 (patch)
treea7545803326a0e48d29c500d14d4ac9595f14f6e /lib/redmine/scm/adapters/cvs_adapter.rb
parentcc534137ba6a0e12415c9fa1d979ee2e4231000f (diff)
downloadredmine-12c856124b6b968d55053f413a406b97b4423160.tar.gz
redmine-12c856124b6b968d55053f413a406b97b4423160.zip
scm: cvs: code clean up adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5449 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters/cvs_adapter.rb')
-rw-r--r--lib/redmine/scm/adapters/cvs_adapter.rb24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb
index e840f1821..ee8e61d89 100644
--- a/lib/redmine/scm/adapters/cvs_adapter.rb
+++ b/lib/redmine/scm/adapters/cvs_adapter.rb
@@ -170,8 +170,8 @@ module Redmine
revision = nil
state = "entry_start"
end
- if state=="entry_start"
- branch_map=Hash.new
+ if state == "entry_start"
+ branch_map = Hash.new
if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_proj(path))}(.+),v$/ =~ line
entry_path = normalize_cvs_path($1)
entry_name = normalize_path(File.basename($1))
@@ -185,29 +185,29 @@ module Redmine
state = "revision"
end
next
- elsif state=="symbolic"
+ elsif state == "symbolic"
if /^(.*):\s(.*)/ =~ (line.strip)
- branch_map[$1]=$2
+ branch_map[$1] = $2
else
- state="tags"
+ state = "tags"
next
end
- elsif state=="tags"
+ elsif state == "tags"
if /^#{STARTLOG}/ =~ line
commit_log = ""
- state="revision"
+ state = "revision"
elsif /^#{ENDLOG}/ =~ line
- state="head"
+ state = "head"
end
next
- elsif state=="revision"
+ elsif state == "revision"
if /^#{ENDLOG}/ =~ line || /^#{STARTLOG}/ =~ line
if revision
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
+ revBranch = branch_name
end
end
logger.debug("********** YIELD Revision #{revision}::#{revBranch}")
@@ -222,8 +222,8 @@ module Redmine
:name => entry_name,
:kind => 'file',
:action => file_state
- }]
- })
+ }]
+ })
end
commit_log = String.new
revision = nil