py3: fix test-fix-metadata.t
authorPulkit Goyal <pulkit@yandex-team.ru>
Wed, 05 Jun 2019 22:02:57 +0300
changeset 42429 6ed04139ed37
parent 42428 ae3f862cbb3d
child 42430 5b217451a2c2
py3: fix test-fix-metadata.t # skip-blame as just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D6480
contrib/python3-whitelist
tests/test-fix-metadata.t
--- a/contrib/python3-whitelist	Wed Jun 05 22:44:38 2019 +0300
+++ b/contrib/python3-whitelist	Wed Jun 05 22:02:57 2019 +0300
@@ -233,6 +233,7 @@
 test-filelog.py
 test-fileset-generated.t
 test-fileset.t
+test-fix-metadata.t
 test-fix-topology.t
 test-fix.t
 test-flagprocessor.t
--- a/tests/test-fix-metadata.t	Wed Jun 05 22:44:38 2019 +0300
+++ b/tests/test-fix-metadata.t	Wed Jun 05 22:02:57 2019 +0300
@@ -5,9 +5,9 @@
 
   $ cat >> $TESTTMP/postfixhook.py <<EOF
   > import collections
-  > def file(ui, repo, rev=None, path='', metadata=None, **kwargs):
-  >   ui.status('fixed %s in revision %d using %s\n' %
-  >             (path, rev, ', '.join(metadata.keys())))
+  > def file(ui, repo, rev=None, path=b'', metadata=None, **kwargs):
+  >   ui.status(b'fixed %s in revision %d using %s\n' %
+  >             (path, rev, b', '.join(metadata.keys())))
   > def summarize(ui, repo, replacements=None, wdirwritten=False,
   >               metadata=None, **kwargs):
   >     counts = collections.defaultdict(int)
@@ -19,13 +19,13 @@
   >             counts[fixername] += 1
   >             if 'key' in metadata:
   >                 keys += 1
-  >     ui.status('saw "key" %d times\n' % (keys,))
+  >     ui.status(b'saw "key" %d times\n' % (keys,))
   >     for name, count in sorted(counts.items()):
-  >         ui.status('fixed %d files with %s\n' % (count, name))
+  >         ui.status(b'fixed %d files with %s\n' % (count, name))
   >     if replacements:
-  >         ui.status('fixed %d revisions\n' % (len(replacements),))
+  >         ui.status(b'fixed %d revisions\n' % (len(replacements),))
   >     if wdirwritten:
-  >         ui.status('fixed the working copy\n')
+  >         ui.status(b'fixed the working copy\n')
   > EOF
 
 Some mock output for fixer tools that demonstrate what could go wrong with