user/5219: fuzzy patching with litle context matches always

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

user/5219: fuzzy patching with litle context matches always

Otto Moerbeek
>Number:         5219
>Category:       user
>Synopsis:       fuzzy patching with litle context matches always
>Confidential:   yes
>Severity:       non-critical
>Priority:       low
>Responsible:    bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 04 06:10:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Otto Moerbeek
>Release:        4.0
>Organization:
net
>Environment:
       
        System      : OpenBSD 4.0
        Architecture: OpenBSD.i386
        Machine     : i386
>Description:
        If a diff does not have complete (i.e. both leading and
        trailing context), and fuzzy patching is done, patch(1) only uses
        the line number from the diff to find the spot.

        Problem encountered by [hidden email], analysis by me.

>How-To-Repeat:
Take file a and patch it using diff d, both files are in this tgz:

[demime removed a uuencoded section named x.tgz which was 8 lines]
>Fix:
        Take into account the number of lines of trailing and leading
        context in patch_match(), avoiding executing the loop zero times.


>Release-Note:
>Audit-Trail:
>Unformatted:

Reply | Threaded
Open this post in threaded view
|

Re: user/5219: fuzzy patching with litle context matches always

Otto Moerbeek
The following reply was made to PR user/5219; it has been noted by GNATS.

From: Otto Moerbeek <[hidden email]>
To: [hidden email]
Cc:  
Subject: Re: user/5219: fuzzy patching with litle context matches always
Date: Mon, 4 Sep 2006 13:15:05 +0200 (CEST)

 And here's the promised uuencoded tgz
 
  -Otto
 
 begin 644 x.tgz
 M'XL(`````````^W4NVH#,1`%4+6Y7S&]O#!ZSL;5QLZC2I4O6&.WWF!O_C\+
 MFR(0B"NO,=S3"#02,R"N>G=]&E1KSDY5@Q7]O<Y2<D&S5<NJ9M/^="%6IPO,
 MYK[.8W^:6@[C./QW[E+]3@5$)&045!A:/.()FX!M`&X]&BU@OT"/2_D/.?[D
 M/YF5,.<_&?._@*9II']X'X[R<?@4R:*V+F4=6XG3H\%[+[N_Y53G<M=)$U=)
 M?%R9=!UD`]E"X)_A7^!?X=_XC1`1$1$1$1$1$1$1$1$1$1%=U3>"Y?Z"`"@`
 !````
 `
 end