Windows people: please help check idea for a new Mercurial repository layout
Adrian Buehlmann
adrian at cadifra.com
Mon Jun 16 06:38:25 CDT 2008
On 16.06.2008 13:06, Tom Widmer wrote:
> How about using \\?\ to get around the long filename problem, but
> additionally encoding reserved names with a .? That way, only repos with
> extra long pathnames will have problems in explorer, but such repos will
> at least work if you stick to hg commands.
Yes. I agree to doing that, but I would prepend every path component
inside .hg/store/data with a period in order to not have to
scan for the reserved names (and variants) explicitly and keep the
logic stupid simple.
(
+def dotpath(path):
+ '''Encode path to allow storing Windows reserved filenames
+ (e.g. 'nul', 'aux', 'prn', etc.)
+ path must be relative and using '/' as path separator'''
+ return '.' + path.replace('/', '/.')
)
And we will need an additional hg command that can delete
long path repositories (hg destroy? I don't care about the name),
since explorer can't delete long path trees.
Like I said today in
http://selenic.com/pipermail/mercurial/2008-June/019599.html
More information about the Mercurial
mailing list