mercurial/cmdutil.py
changeset 5829 784073457a0f
parent 5797 7b7f03c7dfa5
child 5836 c5c9a022bd9a
--- 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)