You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Gavin Baumanis <ga...@thespidernet.com> on 2009/04/21 22:33:27 UTC
Re: [PATCH] Re: bug when diffing
Hi Alan,
I just realised that I hijacked your initial thread when I first took
over the role of the PM.
Can I please bother you to let me know if your patch has been
committed or not?
If not - then this will obviously serve as an (overdue) ping for the
list.
Gavin.
On 12/03/2009, at 8:40 PM, Alan Wood wrote:
> Hi all,
> I would just like to nudge this patch along. Could someone please
> take a look at it.
> The patch does apply to trunk,
>
> Its been about 6 weeks hanging around, and I know 1.6 is more fun
> and we have had
> a patch manager change too.
>
> I was thinking that it would be nice to be able to see a 'pending
> patches' list
> somewhere. I'm sure Gavin has something like this but could it be
> made more
> accessible to all?
>
> Cheers
> Alan Wood
>
> On 25 Jan 2009 at 16:43, Alan Wood wrote:
>
>> Hi,
>> I have continued on from this and think I have found the cause.
>> The 128k size if the chunk_size for the file diff routines.
>>
>> At the boundary of a chunk in the file libsvn_diff/diff_file.c
>> the routine svn_diff__normalize_buffer() is called for
>> the part of the line that is in the first chunk and then again for
>> the part of the line that is in the new chunk.
>> If the start of the new chunk has characters that are skipped, in
>> this
>> case the \n of the \r\n pair, then the file_token->norm_offset is
>> incorrectly
>> moved forward.
>>
>> A possible log entry:
>> [[[
>> Fix issue with incorrect diff on 128k chunk boundaries
>> * subversion/libsvn_diff/diff_file.c
>> (datasource_get_next_token) don't skip chars at front of buffer
>> if buffer is not the start of a line
>> ]]]
>>
>> Sorry patch is against 1.5.x, I haven't got sqlite yet.
>>
>> Alan Wood
>>
>> On 24 Jan 2009 at 19:53, Stefan Küng wrote:
>>
>>> Hi,
>>>
>>> Just spent the last four hours trying to find the bug in the
>>> lib_diff
>>> but failed miserably. So I'm reporting the issue here hoping someone
>>> else is more familiar with that part of the code.
>>>
>>> How to reproduce the problem:
>>>
>>> * get the attached zip file
>>> * extract file1.txt and file2.txt
>>> (the files are identical but the first line)
>>>
>>> $ svnadmin create repo
>>> $ svn co file://repo/ wc
>>> $ cd wc
>>> $ mv file1.txt wc/file1.txt
>>> $ svn add file1.txt
>>> $ svn ci -m ""
>>> $ mv -f file2.txt file1.txt
>>> $ svn diff file1.txt
>>> .. one line different shown
>>>
>>> But:
>>> $ svn diff file1.txt -x --ignore-eol-style
>>>
>>> shows a line diff on every 128kByte mark in the file!
>>>
>>> I first thought the shown diffs were random, but they're in fact
>>> *exactly* at 128k boundaries.
>>>
>>> This happens with a trunk build from yesterday as well as with an
>>> 1.5.4
>>> client.
>>>
>>>
>>> Stefan
>>>
>>> --
>>> ___
>>> oo // \\ "De Chelonian Mobile"
>>> (_,\/ \_/ \ TortoiseSVN
>>> \ \_/_\_/> The coolest Interface to (Sub)Version Control
>>> /_/ \_\ http://tortoisesvn.net
>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1047363
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1048312
>
>
> <diff_file.patch>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1849708
Re: [PATCH] Re: bug when diffing
Posted by Gavin Baumanis <ga...@thespidernet.com>.
Thanks Greg,
Appreciate the help.
Gavin.
On 22/04/2009, at 9:48 AM, Greg Stein wrote:
> Yes, this patch has been applied. Backported to 1.6.1, too.
>
> On Wed, Apr 22, 2009 at 00:33, Gavin Baumanis
> <ga...@thespidernet.com> wrote:
>> Hi Alan,
>>
>> I just realised that I hijacked your initial thread when I first took
>> over the role of the PM.
>>
>> Can I please bother you to let me know if your patch has been
>> committed or not?
>> If not - then this will obviously serve as an (overdue) ping for the
>> list.
>>
>> Gavin.
>>
>>
>> On 12/03/2009, at 8:40 PM, Alan Wood wrote:
>>
>>> Hi all,
>>> I would just like to nudge this patch along. Could someone please
>>> take a look at it.
>>> The patch does apply to trunk,
>>>
>>> Its been about 6 weeks hanging around, and I know 1.6 is more fun
>>> and we have had
>>> a patch manager change too.
>>>
>>> I was thinking that it would be nice to be able to see a 'pending
>>> patches' list
>>> somewhere. I'm sure Gavin has something like this but could it be
>>> made more
>>> accessible to all?
>>>
>>> Cheers
>>> Alan Wood
>>>
>>> On 25 Jan 2009 at 16:43, Alan Wood wrote:
>>>
>>>> Hi,
>>>> I have continued on from this and think I have found the cause.
>>>> The 128k size if the chunk_size for the file diff routines.
>>>>
>>>> At the boundary of a chunk in the file libsvn_diff/diff_file.c
>>>> the routine svn_diff__normalize_buffer() is called for
>>>> the part of the line that is in the first chunk and then again for
>>>> the part of the line that is in the new chunk.
>>>> If the start of the new chunk has characters that are skipped, in
>>>> this
>>>> case the \n of the \r\n pair, then the file_token->norm_offset is
>>>> incorrectly
>>>> moved forward.
>>>>
>>>> A possible log entry:
>>>> [[[
>>>> Fix issue with incorrect diff on 128k chunk boundaries
>>>> * subversion/libsvn_diff/diff_file.c
>>>> (datasource_get_next_token) don't skip chars at front of buffer
>>>> if buffer is not the start of a line
>>>> ]]]
>>>>
>>>> Sorry patch is against 1.5.x, I haven't got sqlite yet.
>>>>
>>>> Alan Wood
>>>>
>>>> On 24 Jan 2009 at 19:53, Stefan Küng wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Just spent the last four hours trying to find the bug in the
>>>>> lib_diff
>>>>> but failed miserably. So I'm reporting the issue here hoping
>>>>> someone
>>>>> else is more familiar with that part of the code.
>>>>>
>>>>> How to reproduce the problem:
>>>>>
>>>>> * get the attached zip file
>>>>> * extract file1.txt and file2.txt
>>>>> (the files are identical but the first line)
>>>>>
>>>>> $ svnadmin create repo
>>>>> $ svn co file://repo/ wc
>>>>> $ cd wc
>>>>> $ mv file1.txt wc/file1.txt
>>>>> $ svn add file1.txt
>>>>> $ svn ci -m ""
>>>>> $ mv -f file2.txt file1.txt
>>>>> $ svn diff file1.txt
>>>>> .. one line different shown
>>>>>
>>>>> But:
>>>>> $ svn diff file1.txt -x --ignore-eol-style
>>>>>
>>>>> shows a line diff on every 128kByte mark in the file!
>>>>>
>>>>> I first thought the shown diffs were random, but they're in fact
>>>>> *exactly* at 128k boundaries.
>>>>>
>>>>> This happens with a trunk build from yesterday as well as with an
>>>>> 1.5.4
>>>>> client.
>>>>>
>>>>>
>>>>> Stefan
>>>>>
>>>>> --
>>>>> ___
>>>>> oo // \\ "De Chelonian Mobile"
>>>>> (_,\/ \_/ \ TortoiseSVN
>>>>> \ \_/_\_/> The coolest Interface to (Sub)Version Control
>>>>> /_/ \_\ http://tortoisesvn.net
>>>>>
>>>>> ------------------------------------------------------
>>>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1047363
>>>>
>>>> ------------------------------------------------------
>>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1048312
>>>
>>>
>>> <diff_file.patch>
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1849708
>>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1850768
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1850894
Re: [PATCH] Re: bug when diffing
Posted by Greg Stein <gs...@gmail.com>.
Yes, this patch has been applied. Backported to 1.6.1, too.
On Wed, Apr 22, 2009 at 00:33, Gavin Baumanis <ga...@thespidernet.com> wrote:
> Hi Alan,
>
> I just realised that I hijacked your initial thread when I first took
> over the role of the PM.
>
> Can I please bother you to let me know if your patch has been
> committed or not?
> If not - then this will obviously serve as an (overdue) ping for the
> list.
>
> Gavin.
>
>
> On 12/03/2009, at 8:40 PM, Alan Wood wrote:
>
>> Hi all,
>> I would just like to nudge this patch along. Could someone please
>> take a look at it.
>> The patch does apply to trunk,
>>
>> Its been about 6 weeks hanging around, and I know 1.6 is more fun
>> and we have had
>> a patch manager change too.
>>
>> I was thinking that it would be nice to be able to see a 'pending
>> patches' list
>> somewhere. I'm sure Gavin has something like this but could it be
>> made more
>> accessible to all?
>>
>> Cheers
>> Alan Wood
>>
>> On 25 Jan 2009 at 16:43, Alan Wood wrote:
>>
>>> Hi,
>>> I have continued on from this and think I have found the cause.
>>> The 128k size if the chunk_size for the file diff routines.
>>>
>>> At the boundary of a chunk in the file libsvn_diff/diff_file.c
>>> the routine svn_diff__normalize_buffer() is called for
>>> the part of the line that is in the first chunk and then again for
>>> the part of the line that is in the new chunk.
>>> If the start of the new chunk has characters that are skipped, in
>>> this
>>> case the \n of the \r\n pair, then the file_token->norm_offset is
>>> incorrectly
>>> moved forward.
>>>
>>> A possible log entry:
>>> [[[
>>> Fix issue with incorrect diff on 128k chunk boundaries
>>> * subversion/libsvn_diff/diff_file.c
>>> (datasource_get_next_token) don't skip chars at front of buffer
>>> if buffer is not the start of a line
>>> ]]]
>>>
>>> Sorry patch is against 1.5.x, I haven't got sqlite yet.
>>>
>>> Alan Wood
>>>
>>> On 24 Jan 2009 at 19:53, Stefan Küng wrote:
>>>
>>>> Hi,
>>>>
>>>> Just spent the last four hours trying to find the bug in the
>>>> lib_diff
>>>> but failed miserably. So I'm reporting the issue here hoping someone
>>>> else is more familiar with that part of the code.
>>>>
>>>> How to reproduce the problem:
>>>>
>>>> * get the attached zip file
>>>> * extract file1.txt and file2.txt
>>>> (the files are identical but the first line)
>>>>
>>>> $ svnadmin create repo
>>>> $ svn co file://repo/ wc
>>>> $ cd wc
>>>> $ mv file1.txt wc/file1.txt
>>>> $ svn add file1.txt
>>>> $ svn ci -m ""
>>>> $ mv -f file2.txt file1.txt
>>>> $ svn diff file1.txt
>>>> .. one line different shown
>>>>
>>>> But:
>>>> $ svn diff file1.txt -x --ignore-eol-style
>>>>
>>>> shows a line diff on every 128kByte mark in the file!
>>>>
>>>> I first thought the shown diffs were random, but they're in fact
>>>> *exactly* at 128k boundaries.
>>>>
>>>> This happens with a trunk build from yesterday as well as with an
>>>> 1.5.4
>>>> client.
>>>>
>>>>
>>>> Stefan
>>>>
>>>> --
>>>> ___
>>>> oo // \\ "De Chelonian Mobile"
>>>> (_,\/ \_/ \ TortoiseSVN
>>>> \ \_/_\_/> The coolest Interface to (Sub)Version Control
>>>> /_/ \_\ http://tortoisesvn.net
>>>>
>>>> ------------------------------------------------------
>>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1047363
>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1048312
>>
>>
>> <diff_file.patch>
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1849708
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1850768