# HG changeset patch # User Martijn Pieters # Date 2017-03-12 19:56:12 # Node ID d30fb3de4b403209b09c14e4ccaee5fb80accbbf # Parent 7548522742b5f4f9f5c0881ae4a2783ecda2f969 config: avoid using a mutable default Nothing *currently* mutates this list, but the moment something does it'll be shared between all config instances. Avoid this eventuality. diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -18,11 +18,11 @@ from . import ( ) class config(object): - def __init__(self, data=None, includepaths=[]): + def __init__(self, data=None, includepaths=None): self._data = {} self._source = {} self._unset = [] - self._includepaths = includepaths + self._includepaths = includepaths or [] if data: for k in data._data: self._data[k] = data[k].copy()