Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 23533:891aaa7c0c70
scmutil: pass a matcher to scmutil.addremove() instead of a list of patterns
This will make it easier to support subrepository operations.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 09 Nov 2014 19:57:02 -0500 |
parents | 32e68271a037 |
children | 72c23fa4f52f |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Wed Dec 10 23:46:47 2014 -0500 +++ b/mercurial/cmdutil.py Sun Nov 09 19:57:02 2014 -0500 @@ -2197,14 +2197,14 @@ if date: opts['date'] = util.parsedate(date) message = logmessage(ui, opts) + matcher = scmutil.match(repo[None], pats, opts) # extract addremove carefully -- this function can be called from a command # that doesn't support addremove if opts.get('addremove'): - scmutil.addremove(repo, pats, opts) - - return commitfunc(ui, repo, message, - scmutil.match(repo[None], pats, opts), opts) + scmutil.addremove(repo, matcher, opts) + + return commitfunc(ui, repo, message, matcher, opts) def amend(ui, repo, commitfunc, old, extra, pats, opts): # amend will reuse the existing user if not specified, but the obsolete