changeset 7915:fba93bbbca02

merge with crew
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 29 Mar 2009 19:06:56 +0200
parents 48661519913f (diff) 28b5cc18baa2 (current diff)
children f779e1996e23
files
diffstat 2 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Sat Mar 28 18:19:17 2009 +0100
+++ b/mercurial/util.py	Sun Mar 29 19:06:56 2009 +0200
@@ -844,6 +844,19 @@
 
 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 = patkind(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 *
 
--- a/mercurial/windows.py	Sat Mar 28 18:19:17 2009 +0100
+++ b/mercurial/windows.py	Sun Mar 29 19:06:56 2009 +0200
@@ -8,7 +8,8 @@
 reference.
 """
 
-import msvcrt, sys, os
+from i18n import _
+import errno, msvcrt, os, osutil, re, sys
 nulldev = 'NUL:'
 
 umask = 002
@@ -229,20 +230,6 @@
     raise Abort(_('user name not available - set USERNAME '
                   'environment variable'))
 
-def expand_glob(pats):
-    '''On Windows, expand the implicit globs in a list of patterns'''
-    ret = []
-    for p in pats:
-        kind, name = patkind(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
-
 def username(uid=None):
     """Return the name of the user with the given uid.