Project

General

Profile

Patch installation

Added by Milan Zach about 14 years ago

Hi all,
I hove some problems with patch applying. I have installed Redmine 0.9.2 (on Mac OS, using MySQL DB) and I tried to add some patches (Issue #3187 and Issue #337).
I read wiki about patching. BUT I have download file with .patch extension (instead .diff). I used exactly same syntax as in the wiki, but without success. It wrote this error:

Mac-mini-mz:redmine milanzach$ patch -p0 < /Library/WebServer/Documents/redmine/private_issues.v.0.2.diff
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
|index 2610ca6..6158042 100644
|--- a/app/controllers/projects_controller.rb
|+++ b/app/controllers/projects_controller.rb
--------------------------
File to patch:

I tried to wrote path to file, but without success too.

File to patch: app/controllers/projects_controller.rb
patching file app/controllers/projects_controller.rb
Hunk #1 FAILED at 97.
Hunk #2 FAILED at 250.
2 out of 2 hunks FAILED -- saving rejects to file app/controllers/projects_controller.rb.rej
can't find file to patch at input line 33
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app/models/issue.rb b/app/models/issue.rb
|index e3a9e17..0828260 100644
|--- a/app/models/issue.rb
|+++ b/app/models/issue.rb
--------------------------
File to patch:

Can someone help me please?