Defect #1434

CVS: add support for modules names with spaces

Added by Vladymyr Vladymyrov over 9 years ago. Updated over 1 year ago.

Status:ClosedStart date:2008-06-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8
Resolution:Fixed Affected version:0.7.1

Description

redmine fails to import changes from CVS module with space in the name:
For example module: "module with spaces" - redmine generate command which makes cvs to treat the module name as several modules separated with spaces.

Solution is to put module name into the quotes:

Here is patch to fix this:
file: lib/redmine/scm/adapters/cvs_adapter.rb

68c68
<           cmd << " #{path_with_project}" 
---
>           cmd << ' "'+"#{path_with_project}"+'"'
113c113
<           cmd << " #{path_with_project}" 
---
>           cmd << ' "'+"#{path_with_project}"+'"'


Related issues

Duplicated by Redmine - Defect #1642: CVS: add support for modules names with spaces (was #1434). Closed 2008-07-14

Associated revisions

Revision 1527
Added by Jean-Philippe Lang over 9 years ago

CVS: add support for modules names with spaces (#1434).

History

#1 Updated by Vladymyr Vladymyrov over 9 years ago

Here is full fix - for all cvs 8 calls the adapter does:

68c68
<           cmd << " #{path_with_project}" 
---
>           cmd << ' "'+"#{path_with_project}"+'"'
113c113
<           cmd << " #{path_with_project}" 
---
>           cmd << ' "'+"#{path_with_project}"+'"'
233c233
<           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} \"#{path_with_project}\"" 
248c248
<           cmd = "#{CVS_BIN} -d #{root_url} co -r#{identifier} -p #{path_with_project}" 
---
>           cmd = "#{CVS_BIN} -d #{root_url} co -r#{identifier} -p \"#{path_with_project}\"" 
261c261
<           cmd = "#{CVS_BIN} -d #{root_url} rannotate -r#{identifier} #{path_with_project}" 
---
>           cmd = "#{CVS_BIN} -d #{root_url} rannotate -r#{identifier} \"#{path_with_project}\"" 

#2 Updated by Jean-Philippe Lang over 9 years ago

  • Status changed from New to Closed
  • Target version changed from 0.8 to 0.7.2
  • Resolution set to Fixed

Fixed in r1527 using the shell_quote method instead.

#3 Updated by Jean-Philippe Lang over 9 years ago

  • Target version changed from 0.7.2 to 0.8

#4 Updated by John Vanton over 7 years ago

  • Assignee deleted (Jean-Philippe Lang)

Also available in: Atom PDF