Patchwork [17,of,18] configitems: register the 'badserver.closeaftersendbytes' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:57 a.m.
Message ID <4cae09ff4ae72e083ba7.1498964265@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21907/
State Accepted
Headers show

Comments

Pierre-Yves David - July 2, 2017, 2:57 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498786074 -7200
#      Fri Jun 30 03:27:54 2017 +0200
# Node ID 4cae09ff4ae72e083ba7e57cdeba1a4daf3006b3
# Parent  b060d6509d32efeeb4c21e70687b751ae1c7c459
# EXP-Topic config.register.badserver
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 4cae09ff4ae7
configitems: register the 'badserver.closeaftersendbytes' config

Patch

diff --git a/tests/badserverext.py b/tests/badserverext.py
--- a/tests/badserverext.py
+++ b/tests/badserverext.py
@@ -50,6 +50,9 @@  configitem('badserver', 'closeafteraccep
 configitem('badserver', 'closeafterrecvbytes',
     default=0,
 )
+configitem('badserver', 'closeaftersendbytes',
+    default=0,
+)
 
 # We can't adjust __class__ on a socket instance. So we define a proxy type.
 class socketproxy(object):
@@ -272,7 +275,7 @@  def extsetup(ui):
             closeafterrecvbytes = self._ui.configint('badserver',
                                                      'closeafterrecvbytes')
             closeaftersendbytes = self._ui.configint('badserver',
-                                                     'closeaftersendbytes', 0)
+                                                     'closeaftersendbytes')
 
             if closeafterrecvbytes or closeaftersendbytes:
                 socket = socketproxy(socket, self.errorlog,