win32lfn Extension

Allow manipulating long file names on Windows

Author: Aaron Cohen <aaron@assonance.org>

Repository: https://foss.heptapod.net/mercurial/win32lfn

This extension is not distributed with Mercurial

Overview

Windows for legacy reasons only supports files with a total path length, including directory separators, such as "/" of 260 (MAX_PATH) characters. This extension uses an alternate API in Windows which allows manipulating working copy files whose path is longer than 260 characters.

This API is a fairly recent addition to Windows, and works ok for the most part, but there are several limitations in Windows itself when it comes to long paths. If you encounter any issues while using this extension, please update the wiki page and/or email the author.

Caveats:

Configuration

Enable the extension in the appropriate configuration file (mercurial.ini):

[extensions]
win32lfn = C:\path\to\extension\win32lfn.py

Usage

Since the builtin Windows commands don't support long files very well, this extension provides one new command to assist in working with the repo at the command line.

hg lfn [--clean [--force]]

-c --clean              Prompt to delete long files
-f --force              Delete long files without prompting

With no options given, "hg lfn" will list all files in the working copy longer than 260 characters.


CategoryExtensionsByOthers

Win32LongFileNamesExtension (last edited 2021-10-26 18:28:29 by cspeck)