py3: byteify test-push-race.t
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 09 Dec 2018 13:53:08 -0500
changeset 53635 d3d52cc91e83c3f9200ecacb09ee4a64e04b12b5
parent 53634 f79659e1e50fdea654b5111285a4f816104d0b07
child 53636 1aedbf3ef3d128eae75381775cfdc52e033d6ff3
push id1079
push usergszorc@mozilla.com
push dateMon, 10 Dec 2018 19:44:59 +0000
py3: byteify test-push-race.t
contrib/python3-whitelist
tests/test-push-race.t
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -478,16 +478,17 @@ test-push-checkheads-superceed-A8.t
 test-push-checkheads-unpushed-D1.t
 test-push-checkheads-unpushed-D2.t
 test-push-checkheads-unpushed-D3.t
 test-push-checkheads-unpushed-D4.t
 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
 test-qrecord.t
 test-rebase-abort.t
 test-rebase-backup.t
 test-rebase-base-flag.t
 test-rebase-bookmarks.t
--- a/tests/test-push-race.t
+++ b/tests/test-push-race.t
@@ -23,54 +23,54 @@ A set of extension and shell functions e
   >     exchange,
   >     extensions,
   >     registrar,
   > )
   > 
   > 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():
   >                 try:
   >                     os.unlink(watchpath)
   >                 except OSError as exc:
   >                     if exc.errno != errno.ENOENT:
   >                         raise
   >             ui.atexit(delete)
   >     return orig(pushop)
   > 
   > def uisetup(ui):
-  >     extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
+  >     extensions.wrapfunction(exchange, b'_pushbundle2', delaypush)
   > EOF
 
   $ waiton () {
   >     # wait for a file to be created (then delete it)
   >     count=100
   >     while [ ! -f $1 ] ;
   >     do
   >         sleep 0.1;