[PATCH] util: set the hidden attribute on .hg/ during creation on windows (issue4178)

Dave S snidely.too at gmail.com
Fri Mar 7 12:48:38 CST 2014


On Sun, Feb 23, 2014 at 4:33 AM, Mads Kiilerich <mads at kiilerich.com> wrote:

(I blinked, and a couple of weeks went by)

On 02/23/2014 11:29 AM, timeless at gmail.com wrote:
>
>> Mads wrote:
>>
>>  Mercurial is based on the unix tradition where all files starting with
>>> '.' are hidden.
>>> If we really want to set the 'hidden' attribute on windows,
>>> couldn't win32.makedir just do that if the directory starts with '.'?
>>> That would also raise the question if files like .hgignore and
>>> directories like .hglf also should be ignored ...
>>>
>> I'm pretty sure I don't want this behavior for those files.
>>
>> Windows treats files by file extension. I'd be horribly confused if I
>> didn't see / couldn't easily edit these files. It's bad enough that Windows
>> editors don't really like files with no name.
>>
>
> You lost me there. Mercurial do not use extensions on .hgignore and
> .hg/hgrc and that is a bit inconvenient when using point'n'click UI's ...
> but that is a completely different story.
>

For several generations, Windows treats everything after the last "." as an
extension.  (In DOS days, an extension had to fit in 3 chars, but
eventually Windows got past that.)  So "hgignore" is the extension on a
file with name "".  I don't expect that there's a file association set for
this extension.  This is, of course, different from Unix and its heirs that
use file content to decide what a file is, an extension is just a
convention for human readers, and tools may or may not assume an extension
by default.

I don't think Windows applies this rule to directory names, so .hg would
not be considered to be an extension.


/dps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20140307/1caab4e0/attachment.html>


More information about the Mercurial-devel mailing list