util._matcher: remove superfluous variable
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Fri, 16 Mar 2007 22:48:23 -0300
changeset 4236 34c4540c04c5
parent 4235 eca3277c4220
child 4237 da6b14877195
child 4252 e14b6980a014
util._matcher: remove superfluous variable
mercurial/util.py
--- a/mercurial/util.py	Fri Mar 16 22:48:22 2007 -0300
+++ b/mercurial/util.py	Fri Mar 16 22:48:23 2007 -0300
@@ -476,7 +476,6 @@
 
     def normalizepats(names, default):
         pats = []
-        files = []
         roots = []
         anypats = False
         for kind, name in [patkind(p, default) for p in names]:
@@ -484,18 +483,20 @@
                 name = canonpath(canonroot, cwd, name)
             elif kind in ('relglob', 'path'):
                 name = normpath(name)
+
+            pats.append((kind, name))
+
             if kind in ('glob', 're', 'relglob', 'relre'):
-                pats.append((kind, name))
                 anypats = True
+
             if kind == 'glob':
                 root = globprefix(name)
                 roots.append(root)
             elif kind in ('relpath', 'path'):
-                files.append((kind, name))
                 roots.append(name or '.')
             elif kind == 'relglob':
                 roots.append('.')
-        return roots, pats + files, anypats
+        return roots, pats, anypats
 
     roots, pats, anypats = normalizepats(names, dflt_pat)