Patch #3159

Mercurial (Hg) integration doesn't work if redmine is installed in folder path containing space

Added by Afriza N. Arief over 8 years ago. Updated over 8 years ago.

Status:ClosedStart date:2009-04-11
Priority:HighDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:0.8.4

Description

Mercurial (Hg) integration doesn't work if redmine is installed in folder path containing space. The problem is because the template file path is not properly quoted. (e.g. "C:/Program Files/BitNami Redmine Stack/apps/redmine/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl" )

affected branch: 0.8-stable
affected revision: svn r2670
affected file:
http://www.redmine.org/projects/redmine/repository/revisions/2670/entry/branches/0.8-stable/lib/redmine/scm/adapters/mercurial_adapter.rb
affected line: 108

Note: I am beginner in Ruby and redmine. The patch I attached will only quote the path and won't convert forward slash to backslash. Please adjust the patch as deemed necessary.

afriza-quote-template-file-path.patch Magnifier (765 Bytes) Afriza N. Arief, 2009-04-11 16:50

Associated revisions

Revision 2679
Added by Jean-Philippe Lang over 8 years ago

Fixed: Mercurial integration doesn't work if redmine is installed in folder path containing space (#3159).

History

#1 Updated by Afriza N. Arief over 8 years ago

  • % Done changed from 100 to 0

#2 Updated by Afriza N. Arief over 8 years ago

the syndrome is the following error when trying to access Mercurial repository

undefined method `last’ for nil:NilClass
RAILS_ROOT: C:/Program Files/BitNami Redmine Stack/apps/redmine
lib/redmine/scm/adapters/mercurial_adapter.rb:72:in `info’
lib/redmine/scm/adapters/abstract_adapter.rb:150:in `retrieve_root_url’
lib/redmine/scm/adapters/abstract_adapter.rb:54:in `initialize’
app/models/repository.rb:41:in `new’
app/models/repository.rb:41:in `scm’
app/models/repository/mercurial.rb:56:in `fetch_changesets’
app/controllers/repositories_controller.rb:69:in `show’

#4 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from New to Resolved
  • Target version set to 0.8.4

Fix committed in r2679.
Thanks for pointing this out.

#5 Updated by Jean-Philippe Lang over 8 years ago

  • Status changed from Resolved to Closed

Merged in 0.8-stable in r2681.

Also available in: Atom PDF