Mercurial > hg
changeset 34767:6338e23c887d
configitems: register the test config in 'test-push-race.t'
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 11 Oct 2017 23:33:59 +0200 |
parents | d957d4475a64 |
children | 2b954c9c5395 |
files | tests/test-push-race.t |
diffstat | 1 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-push-race.t Wed Oct 11 04:33:00 2017 +0200 +++ b/tests/test-push-race.t Wed Oct 11 23:33:59 2017 +0200 @@ -22,18 +22,29 @@ > from mercurial import ( > exchange, > extensions, + > registrar, + > ) + > + > configtable = {} + > configitem = registrar.configitem(configtable) + > + > configitem('delaypush', 'ready-path', + > default=None, + > ) + > configitem('delaypush', 'release-path', + > default=None, > ) > > def delaypush(orig, pushop): > # notify we are done preparing > ui = pushop.repo.ui - > readypath = ui.config('delaypush', 'ready-path', None) + > readypath = ui.config('delaypush', 'ready-path') > if readypath is not None: > with open(readypath, 'w') as r: > r.write('foo') > ui.status('wrote ready: %s\n' % readypath) > # now wait for the other process to be done - > watchpath = ui.config('delaypush', 'release-path', None) + > watchpath = ui.config('delaypush', 'release-path') > if watchpath is not None: > ui.status('waiting on: %s\n' % watchpath) > limit = 100