filemerge: don't use mutable default argument value
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 26 Dec 2016 16:54:33 -0700
changeset 31389 758526333dec
parent 31388 9e57033fec0c
child 31390 7dafa8d0e006
filemerge: don't use mutable default argument value
mercurial/filemerge.py
--- 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.