[PATCH 5 of 5 rfc] bdiff: make sure we append to repeated lines instead of inserting into range

Mads Kiilerich mads at kiilerich.com
Mon Nov 7 11:15:17 EST 2016


On 11/07/2016 03:40 PM, Pierre-Yves David wrote:
>
>
> On 11/03/2016 10:34 PM, Mads Kiilerich wrote:
>> # HG changeset patch
>> # User Mads Kiilerich <madski at unity3d.com>
>> # Date 1478208837 -3600
>> #      Thu Nov 03 22:33:57 2016 +0100
>> # Node ID be83c5f4ec8931cb7e771a80a3ef5e2042a005c1
>> # Parent  3e0216b2a0995cb21946bc13fb21391013332c57
>> bdiff: make sure we append to repeated lines instead of inserting 
>> into range
>>
>> This will mitigate the symptoms that tests exposed in the previous 
>> changeset.
>
> small nits Would it be possible to have something patch-5-ish before 
> patch 4 then to reduce the line change in patch 5?

No, not the way it is done here. They could be collapsed - I just 
separated them to make it clear why the extra complexity was necessary.

The last step could however perhaps be replaced by the mentioned "shift 
matching sequences" post processing step. That one could come first ... 
but it would arguably also go to far in the direction of making 
aesthetically pleasing diffs in code that "mostly" is used for our 
serialization format of changes. There could perhaps be another post 
processing step that optimize for size.

/Mads



More information about the Mercurial-devel mailing list