Search code examples
pythonmercurialpywin32

Bundling win32lfn extension with Mercurial


I'm working on a Windows server application which uses Mercurial for folder synchronisation between servers (so that we only copy the changes each time). The installer includes a bundled hg folder including all the dlls etc for running Mercurial. This currently works well, however users have been reporting error with files with long paths.

There is an win32lfn extension which deals with this issue. I would like to add this to the Mercurial bundle in the installer.

If I copy the win32lfn.py file into the hg folder and add the relevent line to Mercurial.ini then run hg.eze, I get the message:

win32lfn: This extension requires the pywin32 extension

If I attempt to install Python for Windows Extensions (http://sourceforge.net/projects/pywin32/), the installer tells me I need to install Python 2.7 first. I can do this and get it working on my computer, however, I need to bundle this with my installer without requiring the user to install Python.

Mercurial comes with a Python bundled - how can I add the Python for Windows Extensions to this bundle? I have tried copying the dlls into the hg folder without success.

Can anyone direct me to a solution?


Solution

  • This is pretty fortuitous, I just made a commit to win32lfn removing the pywin32 dependency.