From: Jean-Philippe Lang Date: Sat, 14 Jun 2008 11:42:50 +0000 (+0000) Subject: CVS: add support for modules names with spaces (#1434). X-Git-Tag: 0.8.0-RC1~454 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=40a9bbe946848861cd37d2f300806490bed9194d;p=redmine.git CVS: add support for modules names with spaces (#1434). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1527 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/scm/adapters/cvs_adapter.rb b/lib/redmine/scm/adapters/cvs_adapter.rb index c86b02cb7..18f26b9c8 100644 --- a/lib/redmine/scm/adapters/cvs_adapter.rb +++ b/lib/redmine/scm/adapters/cvs_adapter.rb @@ -65,7 +65,7 @@ module Redmine entries = Entries.new cmd = "#{CVS_BIN} -d #{root_url} rls -ed" cmd << " -D \"#{time_to_cvstime(identifier)}\"" if identifier - cmd << " #{path_with_project}" + cmd << " #{shell_quote path_with_project}" shellout(cmd) do |io| io.each_line(){|line| fields=line.chop.split('/',-1) @@ -110,7 +110,7 @@ module Redmine path_with_project="#{url}#{with_leading_slash(path)}" cmd = "#{CVS_BIN} -d #{root_url} rlog" cmd << " -d\">#{time_to_cvstime(identifier_from)}\"" if identifier_from - cmd << " #{path_with_project}" + cmd << " #{shell_quote path_with_project}" shellout(cmd) do |io| state="entry_start" @@ -230,7 +230,7 @@ module Redmine def diff(path, identifier_from, identifier_to=nil) logger.debug " diff path:'#{path}',identifier_from #{identifier_from}, identifier_to #{identifier_to}" path_with_project="#{url}#{with_leading_slash(path)}" - cmd = "#{CVS_BIN} -d #{root_url} rdiff -u -r#{identifier_to} -r#{identifier_from} #{path_with_project}" + cmd = "#{CVS_BIN} -d #{root_url} rdiff -u -r#{identifier_to} -r#{identifier_from} #{shell_quote path_with_project}" diff = [] shellout(cmd) do |io| io.each_line do |line| @@ -245,7 +245,7 @@ module Redmine identifier = (identifier) ? identifier : "HEAD" logger.debug " cat path:'#{path}',identifier #{identifier}" path_with_project="#{url}#{with_leading_slash(path)}" - cmd = "#{CVS_BIN} -d #{root_url} co -r#{identifier} -p #{path_with_project}" + cmd = "#{CVS_BIN} -d #{root_url} co -r#{identifier} -p #{shell_quote path_with_project}" cat = nil shellout(cmd) do |io| cat = io.read @@ -258,7 +258,7 @@ module Redmine identifier = (identifier) ? identifier : "HEAD" logger.debug " annotate path:'#{path}',identifier #{identifier}" path_with_project="#{url}#{with_leading_slash(path)}" - cmd = "#{CVS_BIN} -d #{root_url} rannotate -r#{identifier} #{path_with_project}" + cmd = "#{CVS_BIN} -d #{root_url} rannotate -r#{identifier} #{shell_quote path_with_project}" blame = Annotate.new shellout(cmd) do |io| io.each_line do |line|