Mercurial > hg
changeset 31409:dddc4812aa7a
hgk: don't use mutable default argument value
Caught by pylint.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 14 Mar 2017 23:48:25 -0700 |
parents | 6e3c79bc9a35 |
children | 86dfd31c0329 |
files | hgext/hgk.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/hgk.py Tue Mar 14 23:48:08 2017 -0700 +++ b/hgext/hgk.py Tue Mar 14 23:48:25 2017 -0700 @@ -71,8 +71,10 @@ inferrepo=True) def difftree(ui, repo, node1=None, node2=None, *files, **opts): """diff trees from two commits""" - def __difftree(repo, node1, node2, files=[]): + def __difftree(repo, node1, node2, files=None): assert node2 is not None + if files is None: + files = [] mmap = repo[node1].manifest() mmap2 = repo[node2].manifest() m = scmutil.match(repo[node1], files)