This is an archive of the discontinued Mercurial Phabricator instance.

fuzz: fix mpatch_corpus to not have an overridden __repr__ on py3
ClosedPublic

Authored by spectral on Dec 11 2019, 6:26 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

spectral created this revision.Dec 11 2019, 6:26 PM
pulkit accepted this revision.Dec 12 2019, 7:19 AM
This revision is now accepted and ready to land.Dec 12 2019, 7:19 AM

Amended following diff to make test-check-format.t happy:

diff --git a/contrib/fuzz/mpatch_corpus.py b/contrib/fuzz/mpatch_corpus.py
--- a/contrib/fuzz/mpatch_corpus.py
+++ b/contrib/fuzz/mpatch_corpus.py
@@ -16,11 +16,15 @@ args = ap.parse_args()
 
 
 if sys.version_info[0] < 3:
+
     class py2reprhack(object):
         def __repr__(self):
             """Py2 calls __repr__ for `bytes(foo)`, forward to __bytes__"""
             return self.__bytes__()
+
+
 else:
+
     class py2reprhack(object):
         """Not needed on py3."""