addremove: remove a mutable default argument
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 24 Sep 2015 01:58:33 -0700
changeset 26324 4a8e21578e14
parent 26323 ed884807dc48
child 26325 cce8ebd31407
addremove: remove a mutable default argument Mutable default arguments are know to the state of California to cause bugs.
mercurial/cmdutil.py
--- a/mercurial/cmdutil.py	Thu Sep 24 00:56:30 2015 -0700
+++ b/mercurial/cmdutil.py	Thu Sep 24 01:58:33 2015 -0700
@@ -2763,7 +2763,9 @@
 
     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()