As documented at
https://msdn.microsoft.com/en-gb/library/windows/desktop/aa365247(v=vs.85).aspx
system settings or per-application settings can now opt in to increasing
the length of MAX_PATH, removing the 260 character restriction. This
impacts the following API calls:
CreateDirectoryW, CreateDirectoryExW, GetCurrentDirectoryW,
RemoveDirectoryW, SetCurrentDirectoryW, CopyFileW, CopyFile2,
CopyFileExW, CreateFileW, CreateFile2, CreateHardLinkW,
CreateSymbolicLinkW, DeleteFileW, FindFirstFileW, FindFirstFileExW,
FindNextFileW, GetFileAttributesW, GetFileAttributesExW,
SetFileAttributesW, GetFullPathNameW, GetLongPathNameW, MoveFileW,
MoveFileExW, MoveFileWithProgressW, ReplaceFileW, SearchPathW,
FindFirstFileNameW, FindNextFileNameW, FindFirstStreamW,
FindNextStreamW, GetCompressedFileSizeW, GetFinalPathNameByHandleW.
Adding an application manifest to hg.exe will activate this setting
and possibly eliminate some 260 character path length limitations
in Mercurial without having to convert all paths to absolute and use
the "\\?\" prefix, which was previously the only supported mechanism
for using longer paths.
I HAVE NOT YET TESTED THIS PATCH.