mercurial/match.py
changeset 13971 bfeaa88b875d
parent 13441 b366a5e021c6
child 14168 135e244776f0
equal deleted inserted replaced
13970:d13913355390 13971:bfeaa88b875d
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 import re
     8 import re
     9 import util
     9 import scmutil, util
    10 from i18n import _
    10 from i18n import _
    11 
    11 
    12 class match(object):
    12 class match(object):
    13     def __init__(self, root, cwd, patterns, include=[], exclude=[],
    13     def __init__(self, root, cwd, patterns, include=[], exclude=[],
    14                  default='glob', exact=False, auditor=None):
    14                  default='glob', exact=False, auditor=None):
   267 
   267 
   268 def _normalize(names, default, root, cwd, auditor):
   268 def _normalize(names, default, root, cwd, auditor):
   269     pats = []
   269     pats = []
   270     for kind, name in [_patsplit(p, default) for p in names]:
   270     for kind, name in [_patsplit(p, default) for p in names]:
   271         if kind in ('glob', 'relpath'):
   271         if kind in ('glob', 'relpath'):
   272             name = util.canonpath(root, cwd, name, auditor)
   272             name = scmutil.canonpath(root, cwd, name, auditor)
   273         elif kind in ('relglob', 'path'):
   273         elif kind in ('relglob', 'path'):
   274             name = util.normpath(name)
   274             name = util.normpath(name)
   275         elif kind in ('listfile', 'listfile0'):
   275         elif kind in ('listfile', 'listfile0'):
   276             delimiter = kind == 'listfile0' and '\0' or '\n'
   276             delimiter = kind == 'listfile0' and '\0' or '\n'
   277             try:
   277             try: