transaction: tr._names are actually bytes, use byte string to join them
authorAnton Shestakov <av6@dwimlabs.net>
Wed, 03 May 2023 18:17:32 -0300
changeset 50447 392e2f31444a
parent 50446 be676c313c7b
child 50448 714b63a707b7
transaction: tr._names are actually bytes, use byte string to join them Looks like this is never checked in the tests? But trying e.g. `print(tr)` by hand before this change would give: TypeError: sequence item 0: expected str instance, bytes found Looks like tr._names are always bytes (although this isn't actually enforced, but maybe at some point it will at least be type checked e.g. by pytype).
mercurial/transaction.py
--- a/mercurial/transaction.py	Mon Apr 17 00:27:46 2023 +0200
+++ b/mercurial/transaction.py	Wed May 03 18:17:32 2023 -0300
@@ -314,7 +314,7 @@
         self._abortcallback = {}
 
     def __repr__(self):
-        name = '/'.join(self._names)
+        name = b'/'.join(self._names)
         return '<transaction name=%s, count=%d, usages=%d>' % (
             name,
             self._count,