Patching by hand
by Erik Madison · in Technical Issues · 07/29/2004 (9:23 am) · 4 replies
Is there a better way to patch by hand? I've been opening the *.patch in my editor, and using cut/paste to add the new code. This then leaves me with lots of + to remove, which can be a real pain if its a long code block. I tried a global replace, but heh, that catches all the x + 1 statements as well.
About the author
#2
07/29/2004 (10:36 am)
Heh, yeah. I'm fine with using patch, but for many of these resources, that is not a good idea, due to the numerous changes. I'm asking for the times when you must bite the bullet, and do the whole thing by hand.
#3
Check out a clean CVS from back when the .patch file was current and auto-patch that. Then use a merge utility between the patched files and your own codebase.
07/29/2004 (12:04 pm)
There are programs like WinMerge, that can make the process easier. Check out a clean CVS from back when the .patch file was current and auto-patch that. Then use a merge utility between the patched files and your own codebase.
#4
What I was hoping for, is something that acts similar to CSDiff (which is like winmerge). It displays its differences in a different color, and underlined. If I cut/paste those (rather than use the merge command), I get a clean block without the underlines and color.
I was just hoping there was something similar, that would open a straight patch file and allow an easier cut/paste. Otherwise, Ill just continue doing it by hand as needed.
07/29/2004 (12:48 pm)
Winmerge is scary. I do use it, and fairly often, but it does like to mess up files.What I was hoping for, is something that acts similar to CSDiff (which is like winmerge). It displays its differences in a different color, and underlined. If I cut/paste those (rather than use the merge command), I get a clean block without the underlines and color.
I was just hoping there was something similar, that would open a straight patch file and allow an easier cut/paste. Otherwise, Ill just continue doing it by hand as needed.
Associate Kyle Carter