Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changegroup.py @ 47160:bc7d465ea11e
manifest: drop the `indexfile` from `manifestrevlog`
Since `manifestrevlog` object are not revlog (no really, they are not?) we drop
the revlog specific attribute. We need to directly access the underlying revlog
in a couple of place that already assume that we have a revlog here.
This is motivated by future change to that revlog attribute.
Differential Revision: https://phab.mercurial-scm.org/D10572
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:21:56 +0200 |
parents | 8bd769b5c941 |
children | a07d5cb03a85 |
line wrap: on
line diff
--- a/mercurial/changegroup.py Mon May 03 12:21:46 2021 +0200 +++ b/mercurial/changegroup.py Mon May 03 12:21:56 2021 +0200 @@ -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