##// END OF EJS Templates
cmdutil.matchpats: allow include/exclude to be optional.
Vadim Gelfer -
r2885:bd29a306 default
parent child Browse files
Show More
@@ -71,8 +71,10 b' def make_file(repo, pat, node=None,'
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)
General Comments 0
You need to be logged in to leave comments. Login now