Patchwork [15,of,18] configitems: register the 'badserver.closeafteraccept' config

login
register
mail settings
Submitter Pierre-Yves David
Date July 2, 2017, 2:57 a.m.
Message ID <56a2d68c1eb6081ebbd0.1498964263@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21906/
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 1498786056 -7200
#      Fri Jun 30 03:27:36 2017 +0200
# Node ID 56a2d68c1eb6081ebbd0df068405e2570c6c5a2e
# Parent  6d678ab1b10d0fddc73003d21aa3c7ec43194e2e
# 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 56a2d68c1eb6
configitems: register the 'badserver.closeafteraccept' config

Patch

diff --git a/tests/badserverext.py b/tests/badserverext.py
--- a/tests/badserverext.py
+++ b/tests/badserverext.py
@@ -33,10 +33,21 @@  from __future__ import absolute_import
 
 import socket
 
+from mercurial import(
+    registrar,
+)
+
 from mercurial.hgweb import (
     server,
 )
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+configitem('badserver', 'closeafteraccept',
+    default=False,
+)
+
 # We can't adjust __class__ on a socket instance. So we define a proxy type.
 class socketproxy(object):
     __slots__ = (