[Zope] How do I apply a patch?
Tino Wildenhain
tino@wildenhain.de
Sun, 22 Jul 2001 11:24:48 +0200
Hi Neil,
--On Sonntag, 22. Juli 2001 09:12 +0200 Neil Burnett <neil@efc.be> wrote:
> Tino
>
> Thanks for the explanation. My OS is WinNT. Its patching system seems to
> rely on the Windows Installer SDK being used to create the patch.
>
> The patch I am interested in is one of Ivo's patches:
>
> http://www.zope.org/Members/ivo/patches/dtml-in.no2.patch
>
> It is small, so I guess that I could try do it manually (I'll take 3
> copies, just in case:-). I assume the ! marks on the left mean 'add this
> statement' as the file doesn't contain the + or - marks you mention.
You are near the truth. This variant of diff marks each section twice:
This is the part to find and remove the lines starting with !
*** 583,589 ****
for index in range(first,end):
# preset
kw['previous-sequence']= 0
! kw['next-sequence']= 0 # now more often defined then
previously
#
if index==first or index==last:
# provide batching information
This is the part to find and add the lines starting with !
--- 583,609 ----
for index in range(first,end):
# preset
kw['previous-sequence']= 0
! kw['next-sequence']= 0 # now more often defined than
previously
It does not only include the line-numbers but also 2 lines of the
surrounding
code, so the patch programm can validate if the file matches the patch.
With wincvs (http://www.wincvs.org/) you get a patch (and many other)
command
for win32 also.
Regards
Tino
> Regards
>
> Neil
>
>> -----Original Message-----
>> From: Tino Wildenhain [mailto:tino@wildenhain.de]
>> Sent: 22 July 2001 01:15
>> To: Neil Burnett; Zope@Zope. Org
>> Subject: Re: [Zope] How do I apply a patch?
>>
>>
>> Hi Neil,
>>
>> this depends on the actual "patch". If you tell us, where
>> you found it, we might help you better.
>> Mostly patches are created with "diff", a program which
>> determines in which a given text file differs from an other.
>> It puts aut another file, which reads like this:
>> - this line will be removed
>> + this line will be added instead.
>>
>> together whith some information about the line-numbers.
>> This is the transition from the one to the other file.
>> There is a programm called "path" which can read this
>> file and produce the new version.
>>
>> If you dont find a "patch" programm for your OS, you
>> can do it by hand with a text editor. Find the lines
>> which start with - in the one file, remove them and
>> add the lined with + at the given locations.
>>
>>
>> HTH
>> Tino Wildenhain
>>
>>
>> --On Samstag, 21. Juli 2001 22:47 +0200 Neil Burnett <neil@efc.be> wrote:
>>
>> > Sorry for the dumb question. I have located a patch for
>> DT_In.py but as I
>> > am not a dev-er I don't know how to apply it. I have searched Zope, and
>> > the world, but I can't spot a how-to. 'patch' is a common word:-)
>> >
>> > Can someone help me or point me to some instructions please?
>> >
>> > Thank
>> >
>> > Neil
>> >
>> >
>> > _______________________________________________
>> > Zope maillist - Zope@zope.org
>> > http://lists.zope.org/mailman/listinfo/zope
>> > ** No cross posts or HTML encoding! **
>> > (Related lists -
>> > http://lists.zope.org/mailman/listinfo/zope-announce
>> > http://lists.zope.org/mailman/listinfo/zope-dev )
>>
>>
>