On 07/02/2012 05:03 PM, LM wrote:

> Are there any tools out there to help with the maintenance?  Does
> patch or another tool work in the line-offsets case?

Actually plain old "patch" does pretty well at this.
If the changes are easy to deal with, it just goes ahead with the merge.
It gives a message like:

     patching file foo
     Hunk #1 succeeded at 6 with fuzz 1 (offset 4 lines).

Give it a try.

There are, of course, more sophisticated tools, but usually if the 
changes do not apply cleanly with the "patch" command, that's enough 
reason for me to take a look at what has changed... and at that point, I 
can rework my change by hand. Sometimes I find that my change no longer 
makes sense or is no longer needed.

If you discover that more sophisticated works better for you, please 
consider reporting your findings here on the list.

> Was debating with some of my own patches whether it's easier to use
> patch or to attempt to use a tool like sed or perl to search and
> replace code.  The nice thing about the sed replacement approach is
> that location doesn't matter.

Okay, yes, good point. For some things, I also use sed. However, I think 
only to work around configure/installation issues thus far. For 
instance, I use a sed command to get perl to use the system zlib rather 
than build and use the one which ships with perl.


Cheers,
  -Eric

-- 
http://www.freesa.org/ -- mobile: +31 620719662
aim: ericigps -- skype: eric_herman -- jabber: [email protected]
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to