changeset 52619:b9f47b685e90

git: add stubs for gittreemanifestctx methods $ hg log ** unknown exception encountered, please report by visiting ** https://mercurial-scm.org/wiki/BugTracker ** Python 3.11.10 (main, Oct 31 2024, 01:10:40) [Clang 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15 ** Mercurial Distributed SCM (version 6.9.post1.dev337+hg.72af9fa34832) ** Extensions loaded: absorb, churn, git (pygit2 1.14.1), githelp, gpg, hgk, histedit, patchbomb, rebase Traceback (most recent call last): File "/home/jeffpc/src/oss/hg-gitext-test/../hg-gitext/hg", line 61, in <module> dispatch.run() ... File "/usr/home/jeffpc/src/oss/hg-gitext/hgext/git/gitlog.py", line 564, in get return gitmanifest.gittreemanifestctx(self.gitrepo, t) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Can't instantiate abstract class gittreemanifestctx with abstract methods node, read_any_fast_delta, read_delta_new_entries, read_delta_parents, readdelta
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 02 Jan 2025 11:27:45 -0500
parents 143063a94085
children 2b65c9228dc0
files hgext/git/manifest.py
diffstat 1 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/git/manifest.py	Thu Jan 02 11:24:09 2025 -0500
+++ b/hgext/git/manifest.py	Thu Jan 02 11:27:45 2025 -0500
@@ -4,6 +4,7 @@
 
 from typing import (
     Any,
+    Collection,
     Iterable,
     Iterator,
     Set,
@@ -309,6 +310,26 @@
     def find(self, path: bytes) -> tuple[bytes, bytes]:
         return self.read().find(path)
 
+    def node(self) -> bytes:
+        raise NotImplementedError
+
+    def readdelta(self, shallow: bool = False):
+        raise NotImplementedError
+
+    def read_any_fast_delta(
+        self,
+        valid_bases: Collection[int] | None = None,
+        *,
+        shallow: bool = False,
+    ):
+        raise NotImplementedError
+
+    def read_delta_parents(self, *, shallow: bool = False, exact: bool = True):
+        raise NotImplementedError
+
+    def read_delta_new_entries(self, *, shallow: bool = False):
+        raise NotImplementedError
+
 
 class memgittreemanifestctx(repository.imanifestrevisionwritable):
     def __init__(self, repo, tree):