[PATCH 3 of 3] scmutil: use _winreg.HKEY_LOCAL_MACHINE

Adrian Buehlmann adrian at cadifra.com
Sun May 27 05:35:45 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1338111003 -7200
# Node ID 9d98b66af823e868878fb74a00d8f658dceb705d
# Parent  17d1091a926e2c9dd99e809c71259aea38587155
scmutil: use _winreg.HKEY_LOCAL_MACHINE

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -465,7 +465,7 @@
 
 else:
 
-    _HKEY_LOCAL_MACHINE = 0x80000002L
+    import _winreg
 
     def systemrcpath():
         '''return default os-specific hgrc search path'''
@@ -485,7 +485,7 @@
             return rcpath
         # else look for a system rcpath in the registry
         value = util.lookupreg('SOFTWARE\\Mercurial', None,
-                               _HKEY_LOCAL_MACHINE)
+                               _winreg.HKEY_LOCAL_MACHINE)
         if not isinstance(value, str) or not value:
             return rcpath
         value = util.localpath(value)


More information about the Mercurial-devel mailing list