Patchwork D6480: py3: fix test-fix-metadata.t

login
register
mail settings
Submitter phabricator
Date June 5, 2019, 7:17 p.m.
Message ID <differential-rev-PHID-DREV-4obq7m57zkykcqhrzso6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/40328/
State Superseded
Headers show

Comments

phabricator - June 5, 2019, 7:17 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame as just b'' prefixes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/python3-whitelist
  tests/test-fix-metadata.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-fix-metadata.t b/tests/test-fix-metadata.t
--- a/tests/test-fix-metadata.t
+++ b/tests/test-fix-metadata.t
@@ -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
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -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