changeset 34763:7c52a65010b1

configitems: register the test 'failpush.reason' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 13 Oct 2017 23:10:49 +0200
parents 9223a437fdb6
children af43cb56af4e
files tests/test-bundle2-exchange.t
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-bundle2-exchange.t	Fri Oct 13 23:07:12 2017 +0200
+++ b/tests/test-bundle2-exchange.t	Fri Oct 13 23:10:49 2017 +0200
@@ -461,9 +461,18 @@
   > from mercurial import bundle2
   > from mercurial import exchange
   > from mercurial import extensions
+  > from mercurial import registrar
+  > cmdtable = {}
+  > command = registrar.command(cmdtable)
+  > 
+  > configtable = {}
+  > configitem = registrar.configitem(configtable)
+  > configitem('failpush', 'reason',
+  >     default=None,
+  > )
   > 
   > def _pushbundle2failpart(pushop, bundler):
-  >     reason = pushop.ui.config('failpush', 'reason', None)
+  >     reason = pushop.ui.config('failpush', 'reason')
   >     part = None
   >     if reason == 'abort':
   >         bundler.newpart('test:abort')