util: move windows and posix wildcard imports to begin of file
authorAdrian Buehlmann <adrian@cadifra.com>
Thu, 21 Jul 2011 11:05:26 +0200
changeset 14912 ec46a7da9f2c
parent 14911 5b39503157fd
child 14913 44382887d012
util: move windows and posix wildcard imports to begin of file
mercurial/util.py
--- a/mercurial/util.py	Fri Jul 22 10:35:05 2011 +0200
+++ b/mercurial/util.py	Thu Jul 21 11:05:26 2011 +0200
@@ -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: