# HG changeset patch # User Pierre-Yves David # Date 2017-03-15 06:48:25 # Node ID dddc4812aa7aff48b97e2697bac914b1d8c4036a # Parent 6e3c79bc9a35131a5362e8a0e9000c89955dd883 hgk: don't use mutable default argument value Caught by pylint. diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -71,8 +71,10 @@ testedwith = 'ships-with-hg-core' 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)