Mercurial > hg > mercurial-crew-with-dirclash
changeset 2884:bd29a3067b97
cmdutil.matchpats: allow include/exclude to be optional.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Sun, 13 Aug 2006 17:03:33 -0700 |
parents | fcdcf0c19998 |
children | 26c37ebda1bb bee4b7abcb01 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -71,8 +71,10 @@ def make_file(repo, pat, node=None, def matchpats(repo, pats=[], opts={}, head=''): cwd = repo.getcwd() if not pats and cwd: - opts['include'] = [os.path.join(cwd, i) for i in opts['include']] - opts['exclude'] = [os.path.join(cwd, x) for x in opts['exclude']] + opts['include'] = [os.path.join(cwd, i) + for i in opts.get('include', [])] + opts['exclude'] = [os.path.join(cwd, x) + for x in opts.get('exclude', [])] cwd = '' return util.cmdmatcher(repo.root, cwd, pats or ['.'], opts.get('include'), opts.get('exclude'), head)