mercurial/branchmap.py
changeset 46794 e2f7b2695ba1
parent 46780 6266d19556ad
parent 46685 799973a44c82
child 46819 d4ba4d51f85f
--- a/mercurial/branchmap.py	Tue Mar 02 00:05:22 2021 +0100
+++ b/mercurial/branchmap.py	Thu Mar 18 18:24:59 2021 -0400
@@ -39,6 +39,7 @@
         Tuple,
         Union,
     )
+    from . import localrepo
 
     assert any(
         (
@@ -51,6 +52,7 @@
             Set,
             Tuple,
             Union,
+            localrepo,
         )
     )
 
@@ -193,7 +195,7 @@
         closednodes=None,
         hasnode=None,
     ):
-        # type: (Union[Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]], bytes,  int, Optional[bytes], Optional[Set[bytes]], Optional[Callable[[bytes], bool]]) -> None
+        # type: (localrepo.localrepository, Union[Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]], bytes,  int, Optional[bytes], Optional[Set[bytes]], Optional[Callable[[bytes], bool]]) -> None
         """hasnode is a function which can be used to verify whether changelog
         has a given node or not. If it's not provided, we assume that every node
         we have exists in changelog"""
@@ -303,9 +305,7 @@
                     msg
                     % (
                         _branchcachedesc(repo),
-                        pycompat.bytestr(
-                            inst
-                        ),  # pytype: disable=wrong-arg-types
+                        stringutil.forcebytestr(inst),
                     )
                 )
             bcache = None