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

login
register
mail settings
Submitter Pierre-Yves David
Date June 22, 2017, 7:34 a.m.
Message ID <4d62905327d57f136d48.1498116875@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21607/
State Changes Requested
Headers show

Comments

Pierre-Yves David - June 22, 2017, 7:34 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1497811748 -7200
#      Sun Jun 18 20:49:08 2017 +0200
# Node ID 4d62905327d57f136d48d7a065df9f7f4aace495
# Parent  dce1d4f988a2866b1043b0b8d360016e32a2d808
# 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 4d62905327d5
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.

Patch

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