# HG changeset patch
# User Adrian Buehlmann <adrian@cadifra.com>
# Date 2011-07-21 09:05:26
# Node ID ec46a7da9f2c9c7c68dcb9be48a920c70a6e6f12
# Parent  5b39503157fd211303772a5e30550f3f2f82ca83

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 errno, re, shutil, sys, tempfile,
 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 @@ def checkwinfilename(path):
 
 if os.name == 'nt':
     checkosfilename = checkwinfilename
-    from windows import *
-else:
-    from posix import *
 
 def makelock(info, pathname):
     try: