2195 '''commit the specified files or all outstanding changes''' |
2195 '''commit the specified files or all outstanding changes''' |
2196 date = opts.get('date') |
2196 date = opts.get('date') |
2197 if date: |
2197 if date: |
2198 opts['date'] = util.parsedate(date) |
2198 opts['date'] = util.parsedate(date) |
2199 message = logmessage(ui, opts) |
2199 message = logmessage(ui, opts) |
|
2200 matcher = scmutil.match(repo[None], pats, opts) |
2200 |
2201 |
2201 # extract addremove carefully -- this function can be called from a command |
2202 # extract addremove carefully -- this function can be called from a command |
2202 # that doesn't support addremove |
2203 # that doesn't support addremove |
2203 if opts.get('addremove'): |
2204 if opts.get('addremove'): |
2204 scmutil.addremove(repo, pats, opts) |
2205 scmutil.addremove(repo, matcher, opts) |
2205 |
2206 |
2206 return commitfunc(ui, repo, message, |
2207 return commitfunc(ui, repo, message, matcher, opts) |
2207 scmutil.match(repo[None], pats, opts), opts) |
|
2208 |
2208 |
2209 def amend(ui, repo, commitfunc, old, extra, pats, opts): |
2209 def amend(ui, repo, commitfunc, old, extra, pats, opts): |
2210 # amend will reuse the existing user if not specified, but the obsolete |
2210 # amend will reuse the existing user if not specified, but the obsolete |
2211 # marker creation requires that the current user's name is specified. |
2211 # marker creation requires that the current user's name is specified. |
2212 if obsolete._enabled: |
2212 if obsolete._enabled: |