[PATCH 1 of 1] make pywin32 mandatory when running on Windows

Adrian Buehlmann adrian at cadifra.com
Wed Feb 9 03:57:41 CST 2011


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1297244315 -3600
# Node ID 9f69092c2611b6fa6f71ffb6a1a5d2f508c72778
# Parent  69e69b131458023d21ec40aa48fc5299e43ce69b
make pywin32 mandatory when running on Windows

If we can't use ctpyes, we should at least stop pretending that
Mercurial can be used on Windows without installing pywin32.

Correctly working functions nlinks() and os_link() are essential and
things like system_rcpath_win32() are needed to find the root certs file
installed by the official Windows installers.

A defunct lookup_reg() has the effect that Mercurial on Windows does not
behave as advertised in hgrc.5.html.

We can't even find out the username without win32.getuser().

samefile() and samedevice() are needed by the relink extension, which is
bundled with Mercurial.

A defunct termwidth() spoils the progress extension, which is bundled
with Mercurial.

diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -380,10 +380,6 @@ def groupmembers(name):
     # Don't support groups on Windows for now
     raise KeyError()
 
-try:
-    # override functions with win32 versions if possible
-    from win32 import *
-except ImportError:
-    pass
+from win32 import *
 
 expandglobs = True


More information about the Mercurial-devel mailing list