# HG changeset patch # User Kirill Smelkov # Date 1199956038 -10800 # Node ID 784073457a0ffc9f13367d35f6677ee7e9ab1623 # Parent 863e237b58fb19f5adf01027f5bc30d227cd9bb6 cmdutil.commit: extract 'addremove' from opts carefully we are going to use cmdutil.commit for qrecord, and it's brother qrefresh does not support addremove. diff -r 863e237b58fb -r 784073457a0f mercurial/cmdutil.py --- 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)