diff -r 188c1e9506f5 -r d9537ce64f3a mercurial/scmutil.py --- a/mercurial/scmutil.py Thu Sep 24 01:00:43 2015 -0700 +++ b/mercurial/scmutil.py Thu Sep 24 01:04:10 2015 -0700 @@ -791,7 +791,9 @@ '''Return a matcher that will efficiently match exactly these files.''' return matchmod.exact(repo.root, repo.getcwd(), files, badfn=badfn) -def addremove(repo, matcher, prefix, opts={}, dry_run=None, similarity=None): +def addremove(repo, matcher, prefix, opts=None, dry_run=None, similarity=None): + if opts is None: + opts = {} m = matcher if dry_run is None: dry_run = opts.get('dry_run')