--- a/mercurial/cmdutil.py Thu Jan 10 12:07:18 2008 +0300
+++ b/mercurial/cmdutil.py Thu Jan 10 12:07:18 2008 +0300
@@ -1117,8 +1117,11 @@
'''commit the specified files or all outstanding changes'''
message = logmessage(opts)
- if opts['addremove']:
+ # extract addremove carefully -- this function can be called from a command
+ # that doesn't support addremove
+ if opts.get('addremove'):
addremove(repo, pats, opts)
+
fns, match, anypats = matchpats(repo, pats, opts)
if pats:
status = repo.status(files=fns, match=match)