# HG changeset patch # User Pierre-Yves David # Date 2015-09-24 08:58:33 # Node ID 4a8e21578e1426757ff5bc71ac383d840e6251de # Parent ed884807dc488cb0fdfe5c7b591cb4ba549c22e6 addremove: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs. diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2763,7 +2763,9 @@ def buildcommittext(repo, ctx, subs, ext return "\n".join(edittext) -def commitstatus(repo, node, branch, bheads=None, opts={}): +def commitstatus(repo, node, branch, bheads=None, opts=None): + if opts is None: + opts = {} ctx = repo[node] parents = ctx.parents()