diff mercurial/util.py @ 8614:573734e7e6d0

cmdutils: Take over glob expansion duties from util
author Matt Mackall <mpm@selenic.com>
date Sun, 24 May 2009 16:38:29 -0500
parents 7fe2012b3bd0
children a87c41f65aff
line wrap: on
line diff
--- a/mercurial/util.py	Sun May 24 16:37:34 2009 -0500
+++ b/mercurial/util.py	Sun May 24 16:38:29 2009 -0500
@@ -16,7 +16,7 @@
 from i18n import _
 import error, osutil
 import cStringIO, errno, re, shutil, sys, tempfile, traceback
-import os, stat, time, calendar, glob, random
+import os, stat, time, calendar, random
 import imp
 
 # Python compatibility
@@ -540,19 +540,6 @@
 
 if os.name == 'nt':
     from windows import *
-    def expand_glob(pats):
-        '''On Windows, expand the implicit globs in a list of patterns'''
-        ret = []
-        for p in pats:
-            kind, name = _patsplit(p, None)
-            if kind is None:
-                globbed = glob.glob(name)
-                if globbed:
-                    ret.extend(globbed)
-                    continue
-                # if we couldn't expand the glob, just keep it around
-            ret.append(p)
-        return ret
 else:
     from posix import *