[PATCH] auto rename: best matches and speed improvements UPDATE1

Herbert Griebel herbertg at gmx.at
Wed Oct 1 09:33:02 CDT 2008


Benoit Boissinot wrote:
> On Sun, Sep 28, 2008 at 1:48 AM, Herbert Griebel <herbertg at gmx.at> wrote:
>> # HG changeset patch
>> # User Herbert Griebel <herbertg at gmx.at>
>> # Date 1222555608 -7200
>> # Node ID d5cab1d3339f14d07723944493f88c9b28b49e28
>> # Parent  f29b674cc2210126c2899d94d882c367a8ea64bc
>> auto rename: best matches and speed improvements
>>
>> The auto rename feature of addremove did not rename to the best match
>> and was very slow. The new implementation fixes this using all matches
>> and using statistics of the file content to speed up the matching.
>>
> It looks quite nice (I didn't review it in details yet).
> 
> You should probably put that in it's own file (similarity.py ?)
> And I think this part:
> +    # # This code is only for getting the estimator coefficients
> +    # # and should never run in a released version
> 
> should be removed before the final submission.
I am a little weary about that part. For most people it's
ages since they last solved a linear equation, so the commented out
code is handy when changing something. I would rather have left it in
(I removed it already) for convenience.


I just found out that you cannot easily extract the patch from
the mail when inlined, so it's also available from this link:
http://www.soundboot.com/autorename_bestmatches_and_speed.patch

More comments have also been added, so that understanding the code
should be easier.


Thx & Regards,
Herbert



More information about the Mercurial-devel mailing list