Patchwork [2,of,5] py3: byteify test-push-race.t

login
register
mail settings
Submitter Matt Harbison
Date Dec. 10, 2018, 3:44 a.m.
Message ID <8c34826326a95e218e9f.1544413474@Envy>
Download mbox | patch
Permalink /patch/37043/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 10, 2018, 3:44 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1544381588 18000
#      Sun Dec 09 13:53:08 2018 -0500
# Node ID 8c34826326a95e218e9fac10ec5dc66cff3d912f
# Parent  fa86071307be46ea610dd7620557a10828a1ebc6
py3: byteify test-push-race.t

Patch

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -483,6 +483,7 @@  test-push-checkheads-unpushed-D5.t
 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
diff --git a/tests/test-push-race.t b/tests/test-push-race.t
--- a/tests/test-push-race.t
+++ b/tests/test-push-race.t
@@ -28,31 +28,31 @@  A set of extension and shell functions e
   > 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 @@  A set of extension and shell functions e
   >     return orig(pushop)
   > 
   > def uisetup(ui):
-  >     extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
+  >     extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
   > EOF
 
   $ waiton () {