##// END OF EJS Templates
manifest: drop the CamelCase name for `manifest.manifestdict`...
Matt Harbison -
r52960:35400ce4 default
parent child Browse files
Show More
@@ -504,7 +504,7 except AttributeError:
504 504 _lazymanifest = _LazyManifest
505 505
506 506
507 class ManifestDict:
507 class manifestdict: # (repository.imanifestdict)
508 508 def __init__(self, nodelen: int, data: ByteString = b''):
509 509 self._nodelen = nodelen
510 510 self._lm = _lazymanifest(nodelen, data)
@@ -612,7 +612,7 class ManifestDict:
612 612 if not self.hasdir(fn):
613 613 match.bad(fn, None)
614 614
615 def _matches(self, match: matchmod.basematcher) -> 'ManifestDict':
615 def _matches(self, match: matchmod.basematcher) -> 'manifestdict':
616 616 '''generate a new manifest filtered by the match argument'''
617 617 if match.always():
618 618 return self.copy()
@@ -631,7 +631,7 class ManifestDict:
631 631
632 632 def diff(
633 633 self,
634 m2: 'ManifestDict',
634 m2: 'manifestdict',
635 635 match: Optional[matchmod.basematcher] = None,
636 636 clean: bool = False,
637 637 ) -> Dict[
@@ -677,7 +677,7 class ManifestDict:
677 677 except KeyError:
678 678 return b''
679 679
680 def copy(self) -> 'ManifestDict':
680 def copy(self) -> 'manifestdict':
681 681 c = manifestdict(self._nodelen)
682 682 c._lm = self._lm.copy()
683 683 return c
@@ -753,12 +753,6 class ManifestDict:
753 753 return arraytext, deltatext
754 754
755 755
756 manifestdict = interfaceutil.implementer(repository.imanifestdict)(ManifestDict)
757
758 if typing.TYPE_CHECKING:
759 manifestdict = ManifestDict
760
761
762 756 def _msearch(
763 757 m: ByteString, s: bytes, lo: int = 0, hi: Optional[int] = None
764 758 ) -> Tuple[int, int]:
@@ -2065,7 +2059,7 if typing.TYPE_CHECKING:
2065 2059 manifestrevlog = ManifestRevlog
2066 2060
2067 2061 AnyManifestCtx = Union['ManifestCtx', 'TreeManifestCtx']
2068 AnyManifestDict = Union[ManifestDict, TreeManifest]
2062 AnyManifestDict = Union[manifestdict, TreeManifest]
2069 2063
2070 2064
2071 2065 class ManifestLog:
@@ -2179,7 +2173,7 if typing.TYPE_CHECKING:
2179 2173
2180 2174
2181 2175 class MemManifestCtx:
2182 _manifestdict: ManifestDict
2176 _manifestdict: manifestdict
2183 2177
2184 2178 def __init__(self, manifestlog):
2185 2179 self._manifestlog = manifestlog
@@ -2193,7 +2187,7 class MemManifestCtx:
2193 2187 memmf._manifestdict = self.read().copy()
2194 2188 return memmf
2195 2189
2196 def read(self) -> 'ManifestDict':
2190 def read(self) -> 'manifestdict':
2197 2191 return self._manifestdict
2198 2192
2199 2193 def write(self, transaction, link, p1, p2, added, removed, match=None):
@@ -2222,7 +2216,7 class ManifestCtx:
2222 2216 contents, its parent revs, and its linkrev.
2223 2217 """
2224 2218
2225 _data: Optional[ManifestDict]
2219 _data: Optional[manifestdict]
2226 2220
2227 2221 def __init__(self, manifestlog, node):
2228 2222 self._manifestlog = manifestlog
@@ -2252,7 +2246,7 class ManifestCtx:
2252 2246 def parents(self) -> Tuple[bytes, bytes]:
2253 2247 return self._storage().parents(self._node)
2254 2248
2255 def read(self) -> 'ManifestDict':
2249 def read(self) -> 'manifestdict':
2256 2250 if self._data is None:
2257 2251 nc = self._manifestlog.nodeconstants
2258 2252 if self._node == nc.nullid:
@@ -2268,7 +2262,7 class ManifestCtx:
2268 2262 self._data = manifestdict(nc.nodelen, text)
2269 2263 return self._data
2270 2264
2271 def readfast(self, shallow: bool = False) -> 'ManifestDict':
2265 def readfast(self, shallow: bool = False) -> 'manifestdict':
2272 2266 """Calls either readdelta or read, based on which would be less work.
2273 2267 readdelta is called if the delta is against the p1, and therefore can be
2274 2268 read quickly.
@@ -2287,7 +2281,7 class ManifestCtx:
2287 2281 return self.readdelta()
2288 2282 return self.read()
2289 2283
2290 def readdelta(self, shallow: bool = False) -> 'ManifestDict':
2284 def readdelta(self, shallow: bool = False) -> 'manifestdict':
2291 2285 """Returns a manifest containing just the entries that are present
2292 2286 in this manifest, but not in its p1 manifest. This is efficient to read
2293 2287 if the revlog delta is already p1.
@@ -2309,7 +2303,7 class ManifestCtx:
2309 2303 valid_bases: Optional[Collection[int]] = None,
2310 2304 *,
2311 2305 shallow: bool = False,
2312 ) -> Tuple[Optional[int], ManifestDict]:
2306 ) -> Tuple[Optional[int], manifestdict]:
2313 2307 """see `imanifestrevisionstored` documentation"""
2314 2308 store = self._storage()
2315 2309 r = store.rev(self._node)
@@ -2330,7 +2324,7 class ManifestCtx:
2330 2324 *,
2331 2325 shallow: bool = False,
2332 2326 exact: bool = True,
2333 ) -> ManifestDict:
2327 ) -> manifestdict:
2334 2328 """see `interface.imanifestrevisionbase` documentations"""
2335 2329 store = self._storage()
2336 2330 r = store.rev(self._node)
@@ -2359,7 +2353,7 class ManifestCtx:
2359 2353 md.set(f, new_node, new_flag)
2360 2354 return md
2361 2355
2362 def read_delta_new_entries(self, *, shallow=False) -> ManifestDict:
2356 def read_delta_new_entries(self, *, shallow=False) -> manifestdict:
2363 2357 """see `interface.imanifestrevisionbase` documentations"""
2364 2358 # If we are using narrow, returning a delta against an arbitrary
2365 2359 # changeset might return file outside the narrowspec. This can create
@@ -2571,7 +2565,7 class TreeManifestCtx:
2571 2565 best_base = max(valid_bases)
2572 2566 return (None, self._read_storage_slow_delta(base=best_base))
2573 2567
2574 def _read_storage_delta_shallow(self) -> ManifestDict:
2568 def _read_storage_delta_shallow(self) -> manifestdict:
2575 2569 store = self._storage()
2576 2570 r = store.rev(self._node)
2577 2571 d = mdiff.patchtext(store.revdiff(store.deltaparent(r), r))
General Comments 0
You need to be logged in to leave comments. Login now