Show More
@@ -27,6 +27,23 b' from .utils import (' | |||||
27 | stringutil, |
|
27 | stringutil, | |
28 | ) |
|
28 | ) | |
29 |
|
29 | |||
|
30 | if not globals(): | |||
|
31 | from typing import ( | |||
|
32 | Any, | |||
|
33 | Callable, | |||
|
34 | Dict, | |||
|
35 | Iterable, | |||
|
36 | List, | |||
|
37 | Optional, | |||
|
38 | Set, | |||
|
39 | Tuple, | |||
|
40 | Union, | |||
|
41 | ) | |||
|
42 | ||||
|
43 | assert any( | |||
|
44 | (Any, Callable, Dict, Iterable, List, Optional, Set, Tuple, Union,) | |||
|
45 | ) | |||
|
46 | ||||
30 | subsettable = repoviewutil.subsettable |
|
47 | subsettable = repoviewutil.subsettable | |
31 |
|
48 | |||
32 | calcsize = struct.calcsize |
|
49 | calcsize = struct.calcsize | |
@@ -165,6 +182,7 b' class branchcache(object):' | |||||
165 | closednodes=None, |
|
182 | closednodes=None, | |
166 | hasnode=None, |
|
183 | hasnode=None, | |
167 | ): |
|
184 | ): | |
|
185 | # type: (Union[Dict[bytes, List[bytes]], Iterable[Tuple[bytes, List[bytes]]]], bytes, int, Optional[bytes], Optional[Set[bytes]], Optional[Callable[[bytes], bool]]) -> None | |||
168 | """ hasnode is a function which can be used to verify whether changelog |
|
186 | """ hasnode is a function which can be used to verify whether changelog | |
169 | has a given node or not. If it's not provided, we assume that every node |
|
187 | has a given node or not. If it's not provided, we assume that every node | |
170 | we have exists in changelog """ |
|
188 | we have exists in changelog """ | |
@@ -177,7 +195,7 b' class branchcache(object):' | |||||
177 | if closednodes is None: |
|
195 | if closednodes is None: | |
178 | self._closednodes = set() |
|
196 | self._closednodes = set() | |
179 | else: |
|
197 | else: | |
180 |
self._closednodes = |
|
198 | self._closednodes = closednodes | |
181 | self._entries = dict(entries) |
|
199 | self._entries = dict(entries) | |
182 | # whether closed nodes are verified or not |
|
200 | # whether closed nodes are verified or not | |
183 | self._closedverified = False |
|
201 | self._closedverified = False |
General Comments 0
You need to be logged in to leave comments.
Login now