Windows people: please help check idea for a new Mercurial repository layout

Sean schliden at gmail.com
Mon Jun 16 10:32:09 CDT 2008


Adrian Buehlmann wrote:
> On 16.06.2008 13:58, Peter Arrenbrecht wrote:
>> This may be a rather unconventional idea, but I'll air it
>> nevertheless. Maybe it's going to trigger other ideas and eventually
>> lead somewhere.
>>
>> How about simply skipping aux.i/.d et al. when encountering them on
>> Windows? This would make all accesses to the index/data of such files
>> fail. As I see it, this would have the following consequences:
>>
>> a) You cannot clone such a repo over the wire. Good.
> 
> No. that's bad and entierly unneeded.
> 
> If I have a repo on a unix box that is intended to be used on
> Windows *and* unix in a mixed platform project and someone
> stupidly checks in a file or dir with the name aux (on unix, obviously),
> then realizes his error (maybe after a friendly Windows colleague telling him)

Mercurial users on more fortunate platforms may hate this, but perhaps, the simplest way to approach 
the reserved words issues is to:

1. Understand which words are reserved on each supported platform (there are surely not that many)

2. Issue a warning (on initial import) when a file will break the reserved words rules on any platform.

i.e. The file you are attempting to commit 'aux.txt' is a reserved word in windows. If you intend 
working on this repo in windows, you should rename this file before commit.


You have been warned, problem solved ....

The windows reserved words (also avoid these names with an extension) appear to be:

'CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, 
LPT5, LPT6, LPT7, LPT8, and LPT9'

It is not sexy, but it is a simple approach that gives the user the option (and warning), rather 
than imposing difficult architectural decisions on the developers.


Additionally, I think that : is no longer a reserved character...

In order to support streams, I understand that NTFS extended its name support to include the use of 
the colon (':') character to separate the name of the file from the name of the stream.



Cheers

Sean



More information about the Mercurial mailing list