Patchwork [5,of,6] py3: byte-stringify literals in hook script in test-bundle.t

login
register
mail settings
Submitter Yuya Nishihara
Date July 8, 2018, 12:30 p.m.
Message ID <b7a4422cf4bb5b39b820.1531053046@mimosa>
Download mbox | patch
Permalink /patch/32691/
State Accepted
Headers show

Comments

Yuya Nishihara - July 8, 2018, 12:30 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1531039025 -32400
#      Sun Jul 08 17:37:05 2018 +0900
# Node ID b7a4422cf4bb5b39b8205756d2cba7ca9bd0e9f2
# Parent  a6cd4ea3c3ad4e0bdb2ff40ffc37824e324dc9ed
py3: byte-stringify literals in hook script in test-bundle.t

# skip-blame just some b''

Patch

diff --git a/tests/test-bundle.t b/tests/test-bundle.t
--- a/tests/test-bundle.t
+++ b/tests/test-bundle.t
@@ -339,20 +339,20 @@  transaction)
   > from __future__ import absolute_import
   > 
   > def showtip(ui, repo, hooktype, **kwargs):
-  >     ui.warn('%s: %s\n' % (hooktype, repo['tip'].hex()[:12]))
+  >     ui.warn(b'%s: %s\n' % (hooktype, repo[b'tip'].hex()[:12]))
   > 
   > def reposetup(ui, repo):
   >     # this confirms (and ensures) that (empty) 00changelog.i
   >     # before streamclone is already cached as repo.changelog
-  >     ui.setconfig('hooks', 'pretxnopen.showtip', showtip)
+  >     ui.setconfig(b'hooks', b'pretxnopen.showtip', showtip)
   > 
   >     # this confirms that streamclone-ed changes are visible to
   >     # in-process procedures before closing transaction
-  >     ui.setconfig('hooks', 'pretxnclose.showtip', showtip)
+  >     ui.setconfig(b'hooks', b'pretxnclose.showtip', showtip)
   > 
   >     # this confirms that streamclone-ed changes are still visible
   >     # after closing transaction
-  >     ui.setconfig('hooks', 'txnclose.showtip', showtip)
+  >     ui.setconfig(b'hooks', b'txnclose.showtip', showtip)
   > EOF
   $ cat >> $HGRCPATH <<EOF
   > [extensions]