Patchwork [3,of,6] py3: make sure the commands name are bytes in test-devel-warnings.t

login
register
mail settings
Submitter Pulkit Goyal
Date June 20, 2017, 11:31 p.m.
Message ID <f4278aaacb6aa740436a.1498001489@workspace>
Download mbox | patch
Permalink /patch/21550/
State Accepted
Headers show

Comments

Pulkit Goyal - June 20, 2017, 11:31 p.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1497982850 -19800
#      Tue Jun 20 23:50:50 2017 +0530
# Node ID f4278aaacb6aa740436af377236067e258489f0b
# Parent  9fc4a0936f971133fb4a823e9171a4ea184bc970
py3: make sure the commands name are bytes in test-devel-warnings.t

Patch

diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
--- a/tests/test-devel-warnings.t
+++ b/tests/test-devel-warnings.t
@@ -8,20 +8,20 @@ 
   > cmdtable = {}
   > command = registrar.command(cmdtable)
   > 
-  > @command('buggylocking', [], '')
+  > @command(b'buggylocking', [], '')
   > def buggylocking(ui, repo):
   >     lo = repo.lock()
   >     wl = repo.wlock()
   >     wl.release()
   >     lo.release()
   > 
-  > @command('buggytransaction', [], '')
+  > @command(b'buggytransaction', [], '')
   > def buggylocking(ui, repo):
   >     tr = repo.transaction('buggy')
   >     # make sure we rollback the transaction as we don't want to rely on the__del__
   >     tr.release()
   > 
-  > @command('properlocking', [], '')
+  > @command(b'properlocking', [], '')
   > def properlocking(ui, repo):
   >     """check that reentrance is fine"""
   >     wl = repo.wlock()
@@ -37,14 +37,14 @@ 
   >     lo.release()
   >     wl.release()
   > 
-  > @command('nowaitlocking', [], '')
+  > @command(b'nowaitlocking', [], '')
   > def nowaitlocking(ui, repo):
   >     lo = repo.lock()
   >     wl = repo.wlock(wait=False)
   >     wl.release()
   >     lo.release()
   > 
-  > @command('stripintr', [], '')
+  > @command(b'stripintr', [], '')
   > def stripintr(ui, repo):
   >     lo = repo.lock()
   >     tr = repo.transaction('foobar')
@@ -52,16 +52,16 @@ 
   >         repair.strip(repo.ui, repo, [repo['.'].node()])
   >     finally:
   >         lo.release()
-  > @command('oldanddeprecated', [], '')
+  > @command(b'oldanddeprecated', [], '')
   > def oldanddeprecated(ui, repo):
   >     """test deprecation warning API"""
   >     def foobar(ui):
   >         ui.deprecwarn('foorbar is deprecated, go shopping', '42.1337')
   >     foobar(ui)
-  > @command('nouiwarning', [], '')
+  > @command(b'nouiwarning', [], '')
   > def nouiwarning(ui, repo):
   >     util.nouideprecwarn('this is a test', '13.37')
-  > @command('programmingerror', [], '')
+  > @command(b'programmingerror', [], '')
   > def programmingerror(ui, repo):
   >     raise error.ProgrammingError('something went wrong', hint='try again')
   > EOF