changeset 8578:8388ef8d21cd

match: tweak some names
author Matt Mackall <mpm@selenic.com>
date Sun, 24 May 2009 02:56:14 -0500
parents c7bab7fede4c
children aff7f83c365b
files mercurial/match.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Sun May 24 02:56:14 2009 -0500
+++ b/mercurial/match.py	Sun May 24 02:56:14 2009 -0500
@@ -166,11 +166,11 @@
         root.append(p)
     return '/'.join(root) or '.'
 
-def _normalizepats(names, default, canonroot, cwd):
+def _normalize(names, default, root, cwd):
     pats = []
     for kind, name in [_patsplit(p, default) for p in names]:
         if kind in ('glob', 'relpath'):
-            name = util.canonpath(canonroot, cwd, name)
+            name = util.canonpath(root, cwd, name)
         elif kind in ('relglob', 'path'):
             name = util.normpath(name)
 
@@ -226,14 +226,14 @@
     anypats = bool(inc or exc)
 
     if names:
-        pats = _normalizepats(names, dflt_pat, root, cwd)
+        pats = _normalize(names, dflt_pat, root, cwd)
         roots = _roots(pats)
         anypats = anypats or _anypats(pats)
         patmatch = _matchfn(pats, '$')
     if inc:
-        incmatch = _matchfn(_normalizepats(inc, 'glob', root, cwd), '(?:/|$)')
+        incmatch = _matchfn(_normalize(inc, 'glob', root, cwd), '(?:/|$)')
     if exc:
-        excmatch = _matchfn(_normalizepats(exc, 'glob', root, cwd), '(?:/|$)')
+        excmatch = _matchfn(_normalize(exc, 'glob', root, cwd), '(?:/|$)')
 
     if names:
         if inc: