scm: subversion: code clean up model.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5429 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-12 05:05:35 +00:00
parent 5bb06ae42d
commit a7aee902f2
1 changed files with 5 additions and 4 deletions

View File

@ -251,9 +251,9 @@ module Redmine
return nil if $? && $?.exitstatus != 0 return nil if $? && $?.exitstatus != 0
blame blame
end end
private private
def credentials_string def credentials_string
str = '' str = ''
str << " --username #{shell_quote(@login)}" unless @login.blank? str << " --username #{shell_quote(@login)}" unless @login.blank?
@ -261,9 +261,10 @@ module Redmine
str << " --no-auth-cache --non-interactive" str << " --no-auth-cache --non-interactive"
str str
end end
# Helper that iterates over the child elements of a xml node # Helper that iterates over the child elements of a xml node
# MiniXml returns a hash when a single child is found or an array of hashes for multiple children # MiniXml returns a hash when a single child is found
# or an array of hashes for multiple children
def each_xml_element(node, name) def each_xml_element(node, name)
if node && node[name] if node && node[name]
if node[name].is_a?(Hash) if node[name].is_a?(Hash)