[PATCH] Fix normalize fail on non-lowercase filename (Issue1273)

Adrian Buehlmann adrian at cadifra.com
Tue Sep 2 11:51:44 CDT 2008


On 02.09.2008 16:34, Benoit Boissinot wrote:
> On Mon, Sep 1, 2008 at 3:50 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> # HG changeset patch
>> # User Andrei Vermel <avermel at mail.ru>
>> # Date 1217691290 -14400
>> # Node ID a003f52d59ddfebbfb2fad407b18162160b14a14
>> # Parent  057ced2b85439e47a9b372a8f7a6e9957a422f3b
>> Fix normalize fail on non-lowercase filename (Issue1273)
>>
> 
> Can you add the thing about the performance regression that it is
> supposed to solve too ?
> (http://www.selenic.com/mercurial/bts/issue1273 )
> Having some benchmarks numbers would be very nice.

Benoit, I don't understand what you want.

With this patch, the speed is back to what it was before
http://www.selenic.com/mercurial/bts/issue1273.

For example, the commit I wrote about in
http://www.selenic.com/mercurial/bts/msg6888
is back to ~2.5 sec with this patch (is now 4.7 sec).

And I can confirm that the patch also solves the
bug described in
http://www.selenic.com/mercurial/bts/msg6828
(I've tested that).

Both problems were introduced by Matt's 1e2850ed8171.
Change 1e2850ed8171 is wrong, as per Andrei's explanation
I quoted in http://www.selenic.com/mercurial/bts/msg6890
which I'll repeat here:

On 02.08.2008 23:55, Andrei Vermel wrote (quoted by Adrian):
> Note that os.path.normcase(os.path.normpath(path)) is applied to map keys
> when _foldmap is originally filled. When _foldmap is indexed in
> _normalize(), apparently the same needs to be done.

I can confirm this.

I've also run the testsuite on FreeBSD 6.2 with this patch applied
to crew tip.

So I recommend including this patch.



More information about the Mercurial-devel mailing list