mercurial/unionrepo.py
changeset 47072 4c041c71ec01
parent 46780 6266d19556ad
child 47142 4292bed8da7c
--- a/mercurial/unionrepo.py	Tue May 04 08:54:28 2021 -0700
+++ b/mercurial/unionrepo.py	Tue Apr 06 05:20:24 2021 +0200
@@ -41,7 +41,11 @@
         # To differentiate a rev in the second revlog from a rev in the revlog,
         # we check revision against repotiprev.
         opener = vfsmod.readonlyvfs(opener)
-        revlog.revlog.__init__(self, opener, indexfile)
+        target = getattr(revlog2, 'target', None)
+        if target is None:
+            # a revlog wrapper, eg: the manifestlog that is not an actual revlog
+            target = revlog2._revlog.target
+        revlog.revlog.__init__(self, opener, target=target, indexfile=indexfile)
         self.revlog2 = revlog2
 
         n = len(self)