repair: fix an `isinstance(nodelist, str)` check for py3 stable
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 30 Nov 2019 02:38:42 -0500
branchstable
changeset 43741 8accf5fa9930
parent 43740 d1b9d2c6ec96
child 43742 6ff1a0d109c9
repair: fix an `isinstance(nodelist, str)` check for py3 All of the callers appear to pass a list, so this doesn't fix anything in core hg. But maybe out of tree extensions use this shortcut. Differential Revision: https://phab.mercurial-scm.org/D7533
mercurial/repair.py
--- a/mercurial/repair.py	Fri Nov 29 21:43:13 2019 +0100
+++ b/mercurial/repair.py	Sat Nov 30 02:38:42 2019 -0500
@@ -130,7 +130,7 @@
     cl = repo.changelog
 
     # TODO handle undo of merge sets
-    if isinstance(nodelist, str):
+    if isinstance(nodelist, bytes):
         nodelist = [nodelist]
     striplist = [cl.rev(node) for node in nodelist]
     striprev = min(striplist)