[PATCH] [RFC] Add an extension allowing the working copy to contain very long filenames on Windows

Aaron Cohen aaron at assonance.org
Wed Jan 12 15:41:56 CST 2011


Hi all,

  I apologize that I've attached this patch, but I'm unable to send
using patchbomb due to our mailserver configuration.

  Windows by default allows path names to only contain 260 characters.
A while ago the "store" format was added which allows repositories on
Windows to contain very long paths. At the time, a patch was proposed
"longpath.patch" which enabled handling of those files in the working
copy but it was tabled. From
http://mercurial.selenic.com/bts/issue839, I infer that the reason for
this is that many tools on Windows don't handle long file names
gracefully. Time has passed though and many programs now work,
including all Java programs.

  I've recently converted an svn repository which contains a number of
files with names longer than 260 characters, so I needed a solution. I
took the same tack as "longpath.patch", in transparently using "UNC"
paths which allow 32768 character filenames in Windows; however,
rather than patching mercurial to do it, I made it a small extension.

  I'd like to propose bundling this with mercurial. It's small and
self-contained, and like all extensions, disabled by default.  It's
still possible to find some programs (such as cmd.exe!) which won't
work with files that have long names, but I think the ability of being
able to work with these repositories on Windows far outweights the
slight possibility that a user might shoot them-self in the foot.

-- Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win32unc.diff
Type: application/octet-stream
Size: 3041 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110112/95486266/attachment.obj>


More information about the Mercurial-devel mailing list