[PATCH] configitems: fix registration for 'blackbox.track' config

Boris Feld boris.feld at octobus.net
Wed Oct 11 13:42:21 UTC 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1507728357 -7200
#      Wed Oct 11 15:25:57 2017 +0200
# Node ID 0ae4811261aa53efb6372572dae546fdd98b8f58
# Parent  4a6a337f9c682bdf1659295f871dc43ff33677ca
# EXP-Topic config.fixup.blackbox
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0ae4811261aa
configitems: fix registration for 'blackbox.track' config

Default mutable values could be problematic. Use a lambda that returns the
value instead.

Thanks to martin for catching this bug.

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -71,7 +71,7 @@
     default=False,
 )
 configitem('blackbox', 'track',
-    default=['*'],
+    default=lambda: ['*'],
 )
 
 lastui = None


More information about the Mercurial-devel mailing list