diff hgext/git/manifest.py @ 52620:2b65c9228dc0

git: add parents property to gittreemanifestctx
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 02 Jan 2025 11:33:41 -0500
parents b9f47b685e90
children e627cc25b6f3
line wrap: on
line diff
--- a/hgext/git/manifest.py	Thu Jan 02 11:27:45 2025 -0500
+++ b/hgext/git/manifest.py	Thu Jan 02 11:33:41 2025 -0500
@@ -10,6 +10,8 @@
     Set,
 )
 
+from mercurial.node import sha1nodeconstants
+
 from mercurial import (
     match as matchmod,
     pathutil,
@@ -19,6 +21,7 @@
 from mercurial.interfaces import (
     repository,
 )
+
 from . import gitutil
 
 if typing.TYPE_CHECKING:
@@ -330,6 +333,11 @@
     def read_delta_new_entries(self, *, shallow: bool = False):
         raise NotImplementedError
 
+    @property
+    def parents(self):
+        # FIXME: the 2 parent nodes
+        return sha1nodeconstants.nullid, sha1nodeconstants.nullid
+
 
 class memgittreemanifestctx(repository.imanifestrevisionwritable):
     def __init__(self, repo, tree):