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

Pulkit Goyal 7895pulkit at gmail.com
Tue Jun 20 19:31:29 EDT 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at 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

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


More information about the Mercurial-devel mailing list