Forbidden Windows paths

Adrian Buehlmann adrian at cadifra.com
Sat Jan 10 20:25:26 UTC 2009


On 10.01.2009 19:32, David Champion wrote:
> I have a project on which I collaborate with some Windows users, and I'm
> just starting to move us all over to Mercurial for that.  Before I make
> them all change from TortoiseCVS, I wanted to work with hg/TortoiseHG on
> win32 myself, and I've run into a problem.
> 
> When cloning a repo using either the shell extension or the command
> line client, the operation consistently fails some way through
> with this message:
> 
> abort: The system cannot find the file specified: C:\myclone\.hg\store\data/help/general/aux.hlp.i
> 
> I tried several ways of diagnosing this before finally remembering that
> AUX is a reserved name in any folder on Win32, and sure enough, aux.* is
> as well.  (Back in the old ways, didn't special files require a colon,
> like the VMS device paths it was inherited from?  Why did they ever
> change that?)
> 
> Am I right that the name of the file is the reason for the abort?

Exactly. 'aux.hlp.i' is a reserved filename on Windows.

Someone 'hg add'ed a file 'aux.hlp' on a non-Windows system and
committed it.

Now, that repo can't be cloned to Windows any more using Mercurial
versions prior to 1.1 -- even if you 'hg rename'd the file in the tip
revision.

This is a design bug in the naming scheme used inside the store
for Mercurial versions prior to 1.1.

This has been fixed with the new 'fncache' repo layout introduced
with 1.1. (please use bugfix release 1.1.1 or later).

See http://www.selenic.com/mercurial/wiki/index.cgi/fncacheRepoFormat
and http://www.selenic.com/mercurial/bts/issue793

> Is there any way around this besides renaming the file before cloning?

You will need to hg rename that file to something different
and commit that (on a non-Windows computer).

After that, the tip revision of that repo can be cloned to Windows using
Mercurial 1.1.1 or newer.

Of course, no revision (of that repo) which contains the file "aux.hlp"
can be checked out (checkout = hg update) on Windows (even with
Mercurial 1.1.1), since no version of Mercurial can create files
with reserved names in the working dir.

> This is an option since the source repo is freshly converted from CVS
> and I can filemap it, but I'd rather not if it's unnecessary.



More information about the Mercurial mailing list