[PATCH 5 of 5 V2] util: move windows and posix wildcard imports to begin of file
Adrian Buehlmann
adrian at cadifra.com
Fri Jul 22 05:15:32 CDT 2011
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1311239126 -7200
# Node ID bfca5825989d5457feb02d7f3365de33247e203b
# Parent 20f08fc9adacc257ea1eb9b80e3245392c71a2da
util: move windows and posix wildcard imports to begin of file
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -19,6 +19,11 @@
import os, time, calendar, textwrap, unicodedata, signal
import imp, socket, urllib
+if os.name == 'nt':
+ from windows import *
+else:
+ from posix import *
+
# Python compatibility
def sha1(s):
@@ -477,9 +482,6 @@
if os.name == 'nt':
checkosfilename = checkwinfilename
- from windows import *
-else:
- from posix import *
def makelock(info, pathname):
try:
More information about the Mercurial-devel
mailing list