fsmonitor: fix traceback about bytes and str incompatibility
authorRaphaël Gomès <rgomes@octobus.net>
Wed, 20 Oct 2021 10:26:39 +0200
changeset 48305 6fb282ce9113
parent 48304 2ec5fbe26659
child 48306 1421c75b20de
fsmonitor: fix traceback about bytes and str incompatibility This didn't work anymore in Python 3, switching to a `repr` based reporting does Differential Revision: https://phab.mercurial-scm.org/D11708
hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py	Wed Oct 27 15:18:52 2021 +0200
+++ b/hgext/fsmonitor/__init__.py	Wed Oct 20 10:26:39 2021 +0200
@@ -560,8 +560,8 @@
             for i, (s1, s2) in enumerate(zip(l1, l2)):
                 if set(s1) != set(s2):
                     f.write(b'sets at position %d are unequal\n' % i)
-                    f.write(b'watchman returned: %s\n' % s1)
-                    f.write(b'stat returned: %s\n' % s2)
+                    f.write(b'watchman returned: %r\n' % s1)
+                    f.write(b'stat returned: %r\n' % s2)
         finally:
             f.close()