py3: byteify test-push-race.t
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 09 Dec 2018 13:53:08 -0500
changeset 40870 d3d52cc91e83
parent 40869 f79659e1e50f
child 40871 1aedbf3ef3d1
py3: byteify test-push-race.t
contrib/python3-whitelist
tests/test-push-race.t
--- a/contrib/python3-whitelist	Sun Dec 09 13:33:36 2018 -0500
+++ b/contrib/python3-whitelist	Sun Dec 09 13:53:08 2018 -0500
@@ -483,6 +483,7 @@
 test-push-checkheads-unpushed-D6.t
 test-push-checkheads-unpushed-D7.t
 test-push-http.t
+test-push-race.t
 test-push-warn.t
 test-push.t
 test-pushvars.t
--- a/tests/test-push-race.t	Sun Dec 09 13:33:36 2018 -0500
+++ b/tests/test-push-race.t	Sun Dec 09 13:53:08 2018 -0500
@@ -28,31 +28,31 @@
   > configtable = {}
   > configitem = registrar.configitem(configtable)
   > 
-  > configitem('delaypush', 'ready-path',
+  > configitem(b'delaypush', b'ready-path',
   >     default=None,
   > )
-  > configitem('delaypush', 'release-path',
+  > configitem(b'delaypush', b'release-path',
   >     default=None,
   > )
   > 
   > def delaypush(orig, pushop):
   >     # notify we are done preparing
   >     ui = pushop.repo.ui
-  >     readypath = ui.config('delaypush', 'ready-path')
+  >     readypath = ui.config(b'delaypush', b'ready-path')
   >     if readypath is not None:
   >         with open(readypath, 'w') as r:
   >             r.write('foo')
-  >         ui.status('wrote ready: %s\n' % readypath)
+  >         ui.status(b'wrote ready: %s\n' % readypath)
   >     # now wait for the other process to be done
-  >     watchpath = ui.config('delaypush', 'release-path')
+  >     watchpath = ui.config(b'delaypush', b'release-path')
   >     if watchpath is not None:
-  >         ui.status('waiting on: %s\n' % watchpath)
+  >         ui.status(b'waiting on: %s\n' % watchpath)
   >         limit = 100
   >         while 0 < limit and not os.path.exists(watchpath):
   >             limit -= 1
   >             time.sleep(0.1)
   >         if limit <= 0:
-  >             ui.warn('exiting without watchfile: %s' % watchpath)
+  >             ui.warn(b'exiting without watchfile: %s' % watchpath)
   >         else:
   >             # delete the file at the end of the push
   >             def delete():
@@ -65,7 +65,7 @@
   >     return orig(pushop)
   > 
   > def uisetup(ui):
-  >     extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
+  >     extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
   > EOF
 
   $ waiton () {