Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
26323:ed884807dc48 | 26324:4a8e21578e14 |
---|---|
2761 edittext.append(_("HG: no files changed")) | 2761 edittext.append(_("HG: no files changed")) |
2762 edittext.append("") | 2762 edittext.append("") |
2763 | 2763 |
2764 return "\n".join(edittext) | 2764 return "\n".join(edittext) |
2765 | 2765 |
2766 def commitstatus(repo, node, branch, bheads=None, opts={}): | 2766 def commitstatus(repo, node, branch, bheads=None, opts=None): |
2767 if opts is None: | |
2768 opts = {} | |
2767 ctx = repo[node] | 2769 ctx = repo[node] |
2768 parents = ctx.parents() | 2770 parents = ctx.parents() |
2769 | 2771 |
2770 if (not opts.get('amend') and bheads and node not in bheads and not | 2772 if (not opts.get('amend') and bheads and node not in bheads and not |
2771 [x for x in parents if x.node() in bheads and x.branch() == branch]): | 2773 [x for x in parents if x.node() in bheads and x.branch() == branch]): |