scm: cvs: code clean up adapter.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5449 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cc534137ba
commit
12c856124b
@ -170,8 +170,8 @@ module Redmine
|
|||||||
revision = nil
|
revision = nil
|
||||||
state = "entry_start"
|
state = "entry_start"
|
||||||
end
|
end
|
||||||
if state=="entry_start"
|
if state == "entry_start"
|
||||||
branch_map=Hash.new
|
branch_map = Hash.new
|
||||||
if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_proj(path))}(.+),v$/ =~ line
|
if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_proj(path))}(.+),v$/ =~ line
|
||||||
entry_path = normalize_cvs_path($1)
|
entry_path = normalize_cvs_path($1)
|
||||||
entry_name = normalize_path(File.basename($1))
|
entry_name = normalize_path(File.basename($1))
|
||||||
@ -185,29 +185,29 @@ module Redmine
|
|||||||
state = "revision"
|
state = "revision"
|
||||||
end
|
end
|
||||||
next
|
next
|
||||||
elsif state=="symbolic"
|
elsif state == "symbolic"
|
||||||
if /^(.*):\s(.*)/ =~ (line.strip)
|
if /^(.*):\s(.*)/ =~ (line.strip)
|
||||||
branch_map[$1]=$2
|
branch_map[$1] = $2
|
||||||
else
|
else
|
||||||
state="tags"
|
state = "tags"
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
elsif state=="tags"
|
elsif state == "tags"
|
||||||
if /^#{STARTLOG}/ =~ line
|
if /^#{STARTLOG}/ =~ line
|
||||||
commit_log = ""
|
commit_log = ""
|
||||||
state="revision"
|
state = "revision"
|
||||||
elsif /^#{ENDLOG}/ =~ line
|
elsif /^#{ENDLOG}/ =~ line
|
||||||
state="head"
|
state = "head"
|
||||||
end
|
end
|
||||||
next
|
next
|
||||||
elsif state=="revision"
|
elsif state == "revision"
|
||||||
if /^#{ENDLOG}/ =~ line || /^#{STARTLOG}/ =~ line
|
if /^#{ENDLOG}/ =~ line || /^#{STARTLOG}/ =~ line
|
||||||
if revision
|
if revision
|
||||||
revHelper = CvsRevisionHelper.new(revision)
|
revHelper = CvsRevisionHelper.new(revision)
|
||||||
revBranch = "HEAD"
|
revBranch = "HEAD"
|
||||||
branch_map.each() do |branch_name, branch_point|
|
branch_map.each() do |branch_name, branch_point|
|
||||||
if revHelper.is_in_branch_with_symbol(branch_point)
|
if revHelper.is_in_branch_with_symbol(branch_point)
|
||||||
revBranch=branch_name
|
revBranch = branch_name
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
logger.debug("********** YIELD Revision #{revision}::#{revBranch}")
|
logger.debug("********** YIELD Revision #{revision}::#{revBranch}")
|
||||||
@ -222,8 +222,8 @@ module Redmine
|
|||||||
:name => entry_name,
|
:name => entry_name,
|
||||||
:kind => 'file',
|
:kind => 'file',
|
||||||
:action => file_state
|
:action => file_state
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
commit_log = String.new
|
commit_log = String.new
|
||||||
revision = nil
|
revision = nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user