Commit ad66e0db authored by Toshi MARUYAMA's avatar Toshi MARUYAMA Committed by Eric Davis

scm: darcs: space cleanup in adapter.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4880 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent dbdbe26f
...@@ -21,7 +21,7 @@ require 'rexml/document' ...@@ -21,7 +21,7 @@ require 'rexml/document'
module Redmine module Redmine
module Scm module Scm
module Adapters module Adapters
class DarcsAdapter < AbstractAdapter class DarcsAdapter < AbstractAdapter
# Darcs executable name # Darcs executable name
DARCS_BIN = Redmine::Configuration['scm_darcs_command'] || "darcs" DARCS_BIN = Redmine::Configuration['scm_darcs_command'] || "darcs"
...@@ -73,7 +73,7 @@ module Redmine ...@@ -73,7 +73,7 @@ module Redmine
if path.blank? if path.blank?
path = ( self.class.client_version_above?([2, 2, 0]) ? @url : '.' ) path = ( self.class.client_version_above?([2, 2, 0]) ? @url : '.' )
end end
entries = Entries.new entries = Entries.new
cmd = "#{self.class.sq_bin} annotate --repodir #{shell_quote @url} --xml-output" cmd = "#{self.class.sq_bin} annotate --repodir #{shell_quote @url} --xml-output"
cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier cmd << " --match #{shell_quote("hash #{identifier}")}" if identifier
cmd << " #{shell_quote path}" cmd << " #{shell_quote path}"
...@@ -164,7 +164,7 @@ module Redmine ...@@ -164,7 +164,7 @@ module Redmine
if modified_element.elements['modified_how'].text.match(/removed/) if modified_element.elements['modified_how'].text.match(/removed/)
return nil return nil
end end
Entry.new({:name => element.attributes['name'], Entry.new({:name => element.attributes['name'],
:path => path_prefix + element.attributes['name'], :path => path_prefix + element.attributes['name'],
:kind => element.name == 'file' ? 'file' : 'dir', :kind => element.name == 'file' ? 'file' : 'dir',
...@@ -173,7 +173,7 @@ module Redmine ...@@ -173,7 +173,7 @@ module Redmine
:identifier => nil, :identifier => nil,
:scmid => modified_element.elements['patch'].attributes['hash'] :scmid => modified_element.elements['patch'].attributes['hash']
}) })
}) })
end end
def get_paths_for_patch(hash) def get_paths_for_patch(hash)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment