mercurial/cmdutil.py
changeset 2884 bd29a3067b97
parent 2883 fcdcf0c19998
child 2957 6e062d9b188f
equal deleted inserted replaced
2883:fcdcf0c19998 2884:bd29a3067b97
    69                 mode)
    69                 mode)
    70 
    70 
    71 def matchpats(repo, pats=[], opts={}, head=''):
    71 def matchpats(repo, pats=[], opts={}, head=''):
    72     cwd = repo.getcwd()
    72     cwd = repo.getcwd()
    73     if not pats and cwd:
    73     if not pats and cwd:
    74         opts['include'] = [os.path.join(cwd, i) for i in opts['include']]
    74         opts['include'] = [os.path.join(cwd, i)
    75         opts['exclude'] = [os.path.join(cwd, x) for x in opts['exclude']]
    75                            for i in opts.get('include', [])]
       
    76         opts['exclude'] = [os.path.join(cwd, x)
       
    77                            for x in opts.get('exclude', [])]
    76         cwd = ''
    78         cwd = ''
    77     return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
    79     return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'),
    78                            opts.get('exclude'), head)
    80                            opts.get('exclude'), head)
    79 
    81 
    80 def makewalk(repo, pats=[], opts={}, node=None, head='', badmatch=None):
    82 def makewalk(repo, pats=[], opts={}, node=None, head='', badmatch=None):