Mercurial > hg
changeset 31391:d2878bec55bd
hgweb: don't use mutable default argument value
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 12 Mar 2017 21:52:17 -0700 |
parents | 7dafa8d0e006 |
children | 6168d4b93634 |
files | mercurial/hgweb/webutil.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hgweb/webutil.py Mon Dec 26 16:55:47 2016 -0700 +++ b/mercurial/hgweb/webutil.py Sun Mar 12 21:52:17 2017 -0700 @@ -142,8 +142,8 @@ return hex(self._changelog.node(self._revlog.linkrev(rev))) class _siblings(object): - def __init__(self, siblings=[], hiderev=None): - self.siblings = [s for s in siblings if s.node() != nullid] + def __init__(self, siblings=None, hiderev=None): + self.siblings = [s for s in siblings or [] if s.node() != nullid] if len(self.siblings) == 1 and self.siblings[0].rev() == hiderev: self.siblings = []