Mercurial > hg
comparison hgext/hgk.py @ 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 | a8e4322f64c1 |
children | 46ba2cdda476 |
comparison
equal
deleted
inserted
replaced
31408:6e3c79bc9a35 | 31409:dddc4812aa7a |
---|---|
69 ('S', 'search', "", _('search'))], | 69 ('S', 'search', "", _('search'))], |
70 ('[OPTION]... NODE1 NODE2 [FILE]...'), | 70 ('[OPTION]... NODE1 NODE2 [FILE]...'), |
71 inferrepo=True) | 71 inferrepo=True) |
72 def difftree(ui, repo, node1=None, node2=None, *files, **opts): | 72 def difftree(ui, repo, node1=None, node2=None, *files, **opts): |
73 """diff trees from two commits""" | 73 """diff trees from two commits""" |
74 def __difftree(repo, node1, node2, files=[]): | 74 def __difftree(repo, node1, node2, files=None): |
75 assert node2 is not None | 75 assert node2 is not None |
76 if files is None: | |
77 files = [] | |
76 mmap = repo[node1].manifest() | 78 mmap = repo[node1].manifest() |
77 mmap2 = repo[node2].manifest() | 79 mmap2 = repo[node2].manifest() |
78 m = scmutil.match(repo[node1], files) | 80 m = scmutil.match(repo[node1], files) |
79 modified, added, removed = repo.status(node1, node2, m)[:3] | 81 modified, added, removed = repo.status(node1, node2, m)[:3] |
80 empty = short(nullid) | 82 empty = short(nullid) |