comparison hgext/git/manifest.py @ 48946:642e31cb55f0

py3: use class X: instead of class X(object): The inheritance from object is implied in Python 3. So this should be equivalent. This change was generated via an automated search and replace. So there may have been some accidental changes. Differential Revision: https://phab.mercurial-scm.org/D12352
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 13:08:28 -0700
parents 6000f5b25c9b
children f4733654f144
comparison
equal deleted inserted replaced
48945:55d132525155 48946:642e31cb55f0
13 13
14 pygit2 = gitutil.get_pygit2() 14 pygit2 = gitutil.get_pygit2()
15 15
16 16
17 @interfaceutil.implementer(repository.imanifestdict) 17 @interfaceutil.implementer(repository.imanifestdict)
18 class gittreemanifest(object): 18 class gittreemanifest:
19 """Expose git trees (and optionally a builder's overlay) as a manifestdict. 19 """Expose git trees (and optionally a builder's overlay) as a manifestdict.
20 20
21 Very similar to mercurial.manifest.treemanifest. 21 Very similar to mercurial.manifest.treemanifest.
22 """ 22 """
23 23
256 pend = {p for p in self._pending_changes if match(p)} 256 pend = {p for p in self._pending_changes if match(p)}
257 return iter(sorted((baseline | pend) - deleted)) 257 return iter(sorted((baseline | pend) - deleted))
258 258
259 259
260 @interfaceutil.implementer(repository.imanifestrevisionstored) 260 @interfaceutil.implementer(repository.imanifestrevisionstored)
261 class gittreemanifestctx(object): 261 class gittreemanifestctx:
262 def __init__(self, repo, gittree): 262 def __init__(self, repo, gittree):
263 self._repo = repo 263 self._repo = repo
264 self._tree = gittree 264 self._tree = gittree
265 265
266 def read(self): 266 def read(self):
277 def find(self, path): 277 def find(self, path):
278 return self.read()[path] 278 return self.read()[path]
279 279
280 280
281 @interfaceutil.implementer(repository.imanifestrevisionwritable) 281 @interfaceutil.implementer(repository.imanifestrevisionwritable)
282 class memgittreemanifestctx(object): 282 class memgittreemanifestctx:
283 def __init__(self, repo, tree): 283 def __init__(self, repo, tree):
284 self._repo = repo 284 self._repo = repo
285 self._tree = tree 285 self._tree = tree
286 # dict of path: Optional[Tuple(node, flags)] 286 # dict of path: Optional[Tuple(node, flags)]
287 self._pending_changes = {} 287 self._pending_changes = {}