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

timeless at gmail.com timeless at gmail.com
Sun Feb 23 04:29:54 CST 2014

‎I'm not really sure there's a reason to hide .hg. 

While git might do this, that has to be a bit of a joke:
I've spent the last few months with git and grep -r most certainly doesn't honor the "hidden" feature on OS X. So while Windows might not be showing it sometimes, your average user runs into it regularly. 

Hidden files on Windows are much less visible than dot hidden files in Unix. 


Indicates that it would break PowerShell users (in 2010). (Someone should verify that this hasn't changed since 2010)
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. 

> and if we want to set ‎that flag at all.

> If not, it would be easy to make an extension that wraps win32.makedir 
> to set the hidden flag on dirs starting with '.'.

More information about the Mercurial-devel mailing list