[PATCH] [RFC] Add an extension allowing the working copy to contain very long filenames on Windows

Steve Borho steve at borho.org
Thu Jan 13 15:58:42 CST 2011


On Thu, Jan 13, 2011 at 3:46 PM, Aaron Cohen <aaron at assonance.org> wrote:
> On Wed, Jan 12, 2011 at 5:49 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> On 2011-01-12 22:41, Aaron Cohen wrote:
>>> Hi all,
>>>
>>>   I apologize that I've attached this patch, but I'm unable to send
>>> using patchbomb due to our mailserver configuration.
>>>
>>
>> I'm pasting your patch inline below
>>
>>> # HG changeset patch
>
> Thank you for your review! I've made fixes locally and was going to
> resend, but I also added some test cases and in so doing, ran into a
> problem. It seems the repository I've been testing with has files
> whose total path length was greater than 260, which was what caused my
> initial problem. However, none of the files has a directory portion of
> the path longer than 260 (248 actually).
>
> I made a testcase that tried to make a 260-character-deep directory
> tree, and os.listdir bombs out whether or not I give it a UNC path.
>
> I'm still pursuing alternatives. I may have to look into using win32
> api functions directly. Is it alright for an extension in hgext to
> have a dependency the python pywin32 extensions?

This is fine, so long as it catches them missing in a gracefully way.
All of the binary installers include pywin32.

> Without this fixed, I'm not sure how generally-applicable my extension
> is. It's kind of weird to say, "This extension allows very long
> filenames on windows, unless the directory portion of those filenames
> is too long".


-- 
Steve Borho


More information about the Mercurial-devel mailing list