Patchwork [16,of,17] configitems: register the 'progress.clear-complete' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 4, 2017, 11:10 p.m.
Message ID <5c700932e00c7579c59d.1499209844@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21990/
State Accepted
Headers show

Comments

Pierre-Yves David - July 4, 2017, 11:10 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498787042 -7200
#      Fri Jun 30 03:44:02 2017 +0200
# Node ID 5c700932e00c7579c59dbf54e73ba4f304c5ca1b
# Parent  012ec430208cc4ea15003755057d016ce0c452ca
# EXP-Topic config.register.progress
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 5c700932e00c
configitems: register the 'progress.clear-complete' config

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -119,6 +119,9 @@  coreconfigitem('patch', 'fuzz',
 coreconfigitem('progress', 'assume-tty',
     default=False,
 )
+coreconfigitem('progress', 'clear-complete',
+    default=True,
+)
 coreconfigitem('server', 'bundle1',
     default=True,
 )
diff --git a/mercurial/progress.py b/mercurial/progress.py
--- a/mercurial/progress.py
+++ b/mercurial/progress.py
@@ -191,7 +191,7 @@  class progbar(object):
     def complete(self):
         if not shouldprint(self.ui):
             return
-        if self.ui.configbool('progress', 'clear-complete', default=True):
+        if self.ui.configbool('progress', 'clear-complete'):
             self.clear()
         else:
             self._writeerr('\n')