D2258: py3: add b'' prefixes in test-worker.t

2018-02-14 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4f0439981a8a: py3: add b prefixes in 
test-worker.t (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2258?vs=5698=5714

REVISION DETAIL
  https://phab.mercurial-scm.org/D2258

AFFECTED FILES
  tests/test-worker.t

CHANGE DETAILS

diff --git a/tests/test-worker.t b/tests/test-worker.t
--- a/tests/test-worker.t
+++ b/tests/test-worker.t
@@ -12,34 +12,34 @@
   > def abort(ui, args):
   > if args[0] == 0:
   > # by first worker for test stability
-  > raise error.Abort('known exception')
+  > raise error.Abort(b'known exception')
   > return runme(ui, [])
   > def exc(ui, args):
   > if args[0] == 0:
   > # by first worker for test stability
   > raise Exception('unknown exception')
   > return runme(ui, [])
   > def runme(ui, args):
   > for arg in args:
-  > ui.status('run\n')
+  > ui.status(b'run\n')
   > yield 1, arg
   > time.sleep(0.1) # easier to trigger killworkers code path
   > functable = {
-  > 'abort': abort,
-  > 'exc': exc,
-  > 'runme': runme,
+  > b'abort': abort,
+  > b'exc': exc,
+  > b'runme': runme,
   > }
   > cmdtable = {}
   > command = registrar.command(cmdtable)
-  > @command(b'test', [], 'hg test [COST] [FUNC]')
-  > def t(ui, repo, cost=1.0, func='runme'):
+  > @command(b'test', [], b'hg test [COST] [FUNC]')
+  > def t(ui, repo, cost=1.0, func=b'runme'):
   > cost = float(cost)
   > func = functable[func]
-  > ui.status('start\n')
+  > ui.status(b'start\n')
   > runs = worker.worker(ui, cost, func, (ui,), range(8))
   > for n, i in runs:
   > pass
-  > ui.status('done\n')
+  > ui.status(b'done\n')
   > EOF
   $ abspath=`pwd`/t.py
   $ hg init



To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2258: py3: add b'' prefixes in test-worker.t

2018-02-14 Thread pulkit (Pulkit Goyal)
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame because we are just adding b''

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2258

AFFECTED FILES
  tests/test-worker.t

CHANGE DETAILS

diff --git a/tests/test-worker.t b/tests/test-worker.t
--- a/tests/test-worker.t
+++ b/tests/test-worker.t
@@ -12,34 +12,34 @@
   > def abort(ui, args):
   > if args[0] == 0:
   > # by first worker for test stability
-  > raise error.Abort('known exception')
+  > raise error.Abort(b'known exception')
   > return runme(ui, [])
   > def exc(ui, args):
   > if args[0] == 0:
   > # by first worker for test stability
   > raise Exception('unknown exception')
   > return runme(ui, [])
   > def runme(ui, args):
   > for arg in args:
-  > ui.status('run\n')
+  > ui.status(b'run\n')
   > yield 1, arg
   > time.sleep(0.1) # easier to trigger killworkers code path
   > functable = {
-  > 'abort': abort,
-  > 'exc': exc,
-  > 'runme': runme,
+  > b'abort': abort,
+  > b'exc': exc,
+  > b'runme': runme,
   > }
   > cmdtable = {}
   > command = registrar.command(cmdtable)
-  > @command(b'test', [], 'hg test [COST] [FUNC]')
-  > def t(ui, repo, cost=1.0, func='runme'):
+  > @command(b'test', [], b'hg test [COST] [FUNC]')
+  > def t(ui, repo, cost=1.0, func=b'runme'):
   > cost = float(cost)
   > func = functable[func]
-  > ui.status('start\n')
+  > ui.status(b'start\n')
   > runs = worker.worker(ui, cost, func, (ui,), range(8))
   > for n, i in runs:
   > pass
-  > ui.status('done\n')
+  > ui.status(b'done\n')
   > EOF
   $ abspath=`pwd`/t.py
   $ hg init



To: pulkit, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel