[Commented On] D10572: manifest: drop the `indexfile` from `manifestrevlog`
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue May 4 01:55:36 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27487.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10572?vs=27349&id=27487
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10572/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10572
AFFECTED FILES
mercurial/bundlerepo.py
mercurial/changegroup.py
mercurial/interfaces/repository.py
mercurial/manifest.py
mercurial/unionrepo.py
CHANGE DETAILS
diff --git a/mercurial/unionrepo.py b/mercurial/unionrepo.py
--- a/mercurial/unionrepo.py
+++ b/mercurial/unionrepo.py
@@ -174,7 +174,7 @@
manifest.manifestrevlog.__init__(self, nodeconstants, opener)
manifest2 = manifest.manifestrevlog(nodeconstants, opener2)
unionrevlog.__init__(
- self, opener, self.indexfile, manifest2, linkmapper
+ self, opener, self._revlog.indexfile, manifest2, linkmapper
)
diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -1907,14 +1907,6 @@
)
@property
- def indexfile(self):
- return self._revlog.indexfile
-
- @indexfile.setter
- def indexfile(self, value):
- self._revlog.indexfile = value
-
- @property
def opener(self):
return self._revlog.opener
diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -1167,13 +1167,6 @@
"""An ``ifilerevisionssequence`` instance."""
)
- indexfile = interfaceutil.Attribute(
- """Path of revlog index file.
-
- TODO this is revlog specific and should not be exposed.
- """
- )
-
opener = interfaceutil.Attribute(
"""VFS opener to use to access underlying files used for storage.
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -803,9 +803,15 @@
return i
# We failed to resolve a parent for this node, so
# we crash the changegroup construction.
+ if util.safehasattr(store, 'target'):
+ target = store.indexfile
+ else:
+ # some revlog not actually a revlog
+ target = store._revlog.indexfile
+
raise error.Abort(
b"unable to resolve parent while packing '%s' %r"
- b' for changeset %r' % (store.indexfile, rev, clrev)
+ b' for changeset %r' % (target, rev, clrev)
)
return nullrev
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -201,7 +201,7 @@
self,
opener,
(revlog_constants.KIND_MANIFESTLOG, dir),
- self.indexfile,
+ self._revlog.indexfile,
cgunpacker,
linkmapper,
)
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210504/46fb2f1c/attachment-0002.html>
More information about the Mercurial-patches
mailing list