configitems: register the test 'failpush.reason' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 13 Oct 2017 23:10:49 +0200
changeset 34763 7c52a65010b1
parent 34762 9223a437fdb6
child 34764 af43cb56af4e
configitems: register the test 'failpush.reason' config
tests/test-bundle2-exchange.t
--- 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')