Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 26324:4a8e21578e14
addremove: remove a mutable default argument
Mutable default arguments are know to the state of California to cause bugs.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 24 Sep 2015 01:58:33 -0700 |
parents | d1530c6e8613 |
children | bda14660f0d7 |
line wrap: on
line diff
--- 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()