[PATCH 6 of 6] blackbox: use a human readable version of the default

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 27 09:00:35 EDT 2017


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at octobus.net>
# Date 1497811748 -7200
#      Sun Jun 18 20:49:08 2017 +0200
# Node ID 1f704b77446b3e22c4352ebb85d51bfca837a3a7
# Parent  7f88de5db210f85d30a491a16d0117d8b1656643
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 1f704b77446b
blackbox: use a human readable version of the default

Now that the default value is also converted we can use a human readable version
for it. This will be useful if we start to automatically display the default
config value in various place.

diff --git a/hgext/blackbox.py b/hgext/blackbox.py
--- a/hgext/blackbox.py
+++ b/hgext/blackbox.py
@@ -62,7 +62,7 @@ configtable = {}
 configitem = registrar.configitem(configtable)
 
 configitem('blackbox', 'maxsize',
-    default=1048576,
+    default='1 MB',
 )
 
 lastui = None


More information about the Mercurial-devel mailing list