changeset 31398:758526333dec

filemerge: don't use mutable default argument value
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 26 Dec 2016 16:54:33 -0700
parents 9e57033fec0c
children 7dafa8d0e006
files mercurial/filemerge.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Sun Mar 12 21:50:42 2017 -0700
+++ b/mercurial/filemerge.py	Mon Dec 26 16:54:33 2016 -0700
@@ -35,8 +35,8 @@
 def _toolbool(ui, tool, part, default=False):
     return ui.configbool("merge-tools", tool + "." + part, default)
 
-def _toollist(ui, tool, part, default=[]):
-    return ui.configlist("merge-tools", tool + "." + part, default)
+def _toollist(ui, tool, part, default=None):
+    return ui.configlist("merge-tools", tool + "." + part, default or [])
 
 internals = {}
 # Merge tools to document.