Windows long path experimenting report

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Sun Jun 22 01:52:45 CDT 2008


On Sun, Jun 22, 2008 at 1:09 AM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> On 21.06.2008 10:53, Adrian Buehlmann wrote:
>> Also, IIRC, Mercurial creates temporary files inside the store during some
>> operations (pull?) which have some short random strings appended to the original
>> path (not completely sure on that, will have to recheck to be sure).
>
> I just checked this. My claim is correct.
>
> I used my long path patch and did a
>
> hg clone -U http://hg.intevation.org/mercurial/crew
>
> an excerpt from the output I got (not from beginning):
>
> ...
> called util_win32.makedirs('\\?\W:\tmp\crew\.hg\store\data\mercurial')
> CreateDirectoryW() was successful
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\____init____.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\ancestor.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\ancestor.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\appendfile.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\appendfile.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\archival.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\archival.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\base85.c.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\base85.c.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\bdiff.c.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\bdiff.c.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\bundlerepo.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\bundlerepo.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\byterange.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\byterange.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\changegroup.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\changegroup.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\changelog.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\changelog.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\cmdutil.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\cmdutil.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.d
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\.commands.py.i-gia8zf
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.d
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.d
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\commands.py.d
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\context.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\context.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\copies.py.i
> creating file: \\?\W:\tmp\crew\.hg\store\data\mercurial\copies.py.i
> ...
>
> as you can see Mercurial creates a file
>
> .hg\store\data\mercurial\.commands.py.i-gia8zf
>
> which seems to be related to commands.py.i in that dir.
>
> So we have that additional "i-gia8zf" in the path there (plus a
> dot prepended).

Yes, that would be the new non-inlined index being built by
revlog.checkinlinesize(). So you're right, we should either remember
this suffix when implementing the details of the length limit, or else
make sure it goes through the hashing too, if too long.

At the moment, it is created by util.mktempcopy() and so the suffix
does not go through the encoding functions. Meaning the suffix would
have to be considered in maxpathlen checks for the repo's root (if we
do any, which I currently think we should - but that's going to be
another post).

-parren


More information about the Mercurial-devel mailing list