changeset 47156:89e11a6da785

revlog: use revlog.display_id in narrow error message Differential Revision: https://phab.mercurial-scm.org/D10582
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:23:37 +0200
parents 96ee8ca99f5a
children 3a9f3470922c
files mercurial/changegroup.py tests/test-narrow-pull.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Mon May 03 12:23:27 2021 +0200
+++ b/mercurial/changegroup.py	Mon May 03 12:23:37 2021 +0200
@@ -804,10 +804,10 @@
                 # We failed to resolve a parent for this node, so
                 # we crash the changegroup construction.
                 if util.safehasattr(store, 'target'):
-                    target = store._indexfile
+                    target = store.display_id
                 else:
                     # some revlog not actually a revlog
-                    target = store._revlog._indexfile
+                    target = store._revlog.display_id
 
                 raise error.Abort(
                     b"unable to resolve parent while packing '%s' %r"
--- a/tests/test-narrow-pull.t	Mon May 03 12:23:27 2021 +0200
+++ b/tests/test-narrow-pull.t	Mon May 03 12:23:37 2021 +0200
@@ -147,7 +147,7 @@
   $ hg clone -q --narrow ssh://user@dummy/master narrow2 --include "f1" -r 0
   $ cd narrow2
   $ hg pull -q -r 1
-  remote: abort: unexpected error: unable to resolve parent while packing '00manifest.i' 1 for changeset 0
+  remote: abort: unexpected error: unable to resolve parent while packing '00manifest' 1 for changeset 0
   transaction abort!
   rollback completed
   abort: pull failed on remote