[PATCH 1 of 1 v4] win32lfn: allow manipulating files with long names on Windows

Aaron Cohen aaron at assonance.org
Tue Jan 25 17:09:50 UTC 2011


On Mon, Jan 24, 2011 at 6:37 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
>
> Aaron Cohen wrote, On 01/24/2011 07:11 AM:
>>
>> I've created a bitbucket repo:http://bitbucket.org/remleduff/win32lfn
>
> As mentioned before, I propose you make that the home of this extension and
> let it prove its worth there.

Alright, that was where I was heading.

> These are all other reasons why long file names might be problematic on
> windows, right? You might want to make it clear that it isn't limitations of
> the extension.

I'm not sure what you mean.

>> +
>> +    def lfnchdir(path):
>> +        path = os.path.abspath(path)
>> +        if len(path)>= _maxdirpath:
>
> Is this method reliable or not? If it is reliable then why not always use
> it? If it isn't reliable then why use it at all?

Hmm, it's reliable enough for mercurial to work, but will probably
break when crossing a process boundary. I think
commit/update/status/checkout working is enough that it makes sense to
try to support it. I don't always emulate because you suggested it
made you uncomfortable to not use the OS's chdir in a previous review.
;)

I'm addressing the rest of your review in my bitbucket repo. Thanks
again for the comments.

--Aaron



More information about the Mercurial-devel mailing list