Project

General

Profile

How apply patch file on windows?

Added by Yuri zhukov about 15 years ago

I can apply patch file from link:
http://www.redmine.org/issues/show/443
Help me.


Replies (14)

RE: How apply patch file on windows? - Added by Imran sheth about 15 years ago

Hello there

I am in the same trouble

I am new to ruby and redmine

I have just managed to install redmine (0.8.2)

I would like to apply patch file present here -> http://www.redmine.org/issues/show/443 on my installation

Please let me know what should I do to apply this patch on my configuration.

Best Regards
Imran Sheth

RE: How apply patch file on windows? - Added by Nanda P over 14 years ago

Anybody post link for windows patch application?

Thanks,
Nanda

RE: How apply patch file on windows? - Added by Chris Grieger over 14 years ago

You can find the binary win32 version of patch here:

http://gnuwin32.sourceforge.net/downlinks/patch-bin-zip.php

Regards,
Chris

RE: How apply patch file on windows? - Added by Abdul Nafay over 14 years ago

Hi! i am trying to patch #3614 (export_issues_to_pdf_csv.diff) to my windows version of Redmine. I installed this via Bitnami installer. I can't seem to patch this file! I am new to Redmine and all this. What i know and have done so far is this!

1) Downloaded patch program for windows. And from cmd, i went to directoy where redmine is installed (apps, config, test etc folders). Did command "c:\bin\patch.exe -p0 < export_issues_to_pdf_csv.diff" This gave me a kind of strange statement that there is garbage in the file, something like this. Btw my .diff file was in the folder where patch.exe application exists. After i failed here, i explored TortoiseSVN.

2) Alex Mendes told me that i have to use SVN to retrieve Redmine development build. Not sure why, I used Tortoise SVN and checkout svn://rubyforge.org/var/svn/redmine/trunk . Files were downloaded to a new folder i created. I don't know what to do afterwards with all these files.

How can i get this patch working. I would really really appreciate if somebody could go out of way and explain it in detail how to patch in windows. I searched everywhere but could not locate a single article explaining this. Everywhere i looked it was related to a specific tool. Its disturbing that the patch instructions on this portal are just not useful for newbies.

Looking forward to your help. I'll appreciate it. Thanks!

Regards,

AN

RE: How apply patch file on windows? - Added by Chris Grieger over 14 years ago

Hi Abdul,

to apply the patch, copy it to the redmine base-directory e.g. 'c:\srv\redmine'

Open a shell / cmd and cd to the directory where you have just copied your patchfile to(e.g.'c:\srv\redmine').

Do a "c:\bin\patch.exe -p0 < export_issues_to_pdf_csv.diff" and everything should work fine. If it doesn't work, please post the error message here and i'll look into this. Maybe some files in the current revision have changed and the patch needs to be adjusted.

Regards,
Chris

RE: How apply patch file on windows? - Added by Abdul Nafay over 14 years ago

Thanks Chris!

I did exactly how you described. Here is the output:

C:\Program Files\BitNami Redmine Stack\apps>cd redmine

C:\Program Files\BitNami Redmine Stack\apps\redmine>c:\Patch\bin\patch.exe -p0 <
export_issues_to_pdf_csv.diff
c:\Patch\bin\patch.exe: ** Only garbage was found in the patch input.

Awaiting your response.

Thanks, AN

RE: How apply patch file on windows? - Added by Chris Grieger over 14 years ago

It looks like the patch cannot be applied to the current revision.

I'll look into this now and try to create a new one.

RE: How apply patch file on windows? - Added by Abdul Nafay over 14 years ago

Thanks a bunch. I will wait then.

RE: How apply patch file on windows? - Added by Chris Grieger over 14 years ago

I've attached the new patch file to the issue(#3614). Please download the export_issues_to_pdf_csv_r2823_win32.diff to your redmine base folder and follow the steps provided above.

From http://gnuwin32.sourceforge.net/packages/patch.htm:

On MS-Windows, the patchfile must be a text file, i.e. CR-LF must be used as line endings. A file with LF may give the error:
"Assertion failed, hunk, file patch.c, line 343," unless the option '--binary' is given. 

Using the --binary switch, doesn't help in this case, as it still makes the patch fail. To use unix *.diff files under Windows use a converter like the one found at http://sysd.org/stas/node/34.

Regards,
Chris

RE: How apply patch file on windows? - Added by Rômulo Augusto dos Santos Gomes almost 10 years ago

Hi!

I need help with Installing, Applying patchs for redmine.
I tried everything I found in the internet but I still can't use this patch: Extend Start/Due date to include time

So, can anyone give me a step by step tutorial to I use/apply/install this patch?
I need all steps even the simplest! How I said before I tried everything and still can't use.

I installed a redmine bitnami stack.

Here is my information about the version:

Environment:
Redmine version 2.5.1.stable
Ruby version 1.9.3-p231 (2012-05-25) [i386-mingw32]
Rails version 3.2.17
Environment production
Database adapter Mysql2

My redmine is on a Windows 7. (Not server edition)

Thanks in advance.

RE: How apply patch file on windows? - Added by Lajish Lakshmanan over 9 years ago

@Rômulo Augusto dos Santos Gomes.....I am also looking for same.

RE: How apply patch file on windows? - Added by thomase thomase over 9 years ago

Hello,

I am having the same kind of issue:

Bitnami Redmine stack on a win7.
I use the patch.exe from Gnu : http://gnuwin32.sourceforge.net/packages/patch.htm

I tried to apply different patches from the Htdocs folder, and I always get the same error:

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>patch.exe -p0 < multiple_fixed_versions.patch
patching file app/models/issue.rb
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Is it due to the patch exe ?

Thanks.

Thomas

RE: How apply patch file on windows? - Added by Lajish Lakshmanan over 9 years ago

Hi there,
I requested for same help in Bitnami community. They also made me hopeless...:(

RE: How apply patch file on windows? - Added by Lara R almost 6 years ago

thomase thomase wrote:

Hello,

I am having the same kind of issue:

Bitnami Redmine stack on a win7.
I use the patch.exe from Gnu : http://gnuwin32.sourceforge.net/packages/patch.htm

I tried to apply different patches from the Htdocs folder, and I always get the same error:

C:\Bitnami\redmine-2.5.2-0\apps\redmine\htdocs>patch.exe -p0 < multiple_fixed_versions.patch
patching file app/models/issue.rb
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Is it due to the patch exe ?

Thanks.

Thomas

Having the same issue...did you manage to install it?

    (1-14/14)