mercurial/changegroup.py
changeset 47146 bc7d465ea11e
parent 47086 8bd769b5c941
child 47148 a07d5cb03a85
--- 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