changeset 14912:ec46a7da9f2c

util: move windows and posix wildcard imports to begin of file
author Adrian Buehlmann <adrian@cadifra.com>
date Thu, 21 Jul 2011 11:05:26 +0200
parents 5b39503157fd
children 44382887d012
files mercurial/util.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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: