Patchwork [3,of,3,STABLE] unionrepo: properly handle hidden linkrev in revlog (issue5070)

mail settings
Submitter Pierre-Yves David
Date Feb. 23, 2016, 12:13 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/13310/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show


Pierre-Yves David - Feb. 23, 2016, 12:13 p.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1456180564 -3600
#      Mon Feb 22 23:36:04 2016 +0100
# Branch stable
# Node ID 0f36e00ba083d644f7e57580fda49f0eb124536b
# Parent  2aa1522e1018ff38639c4e6841afbaa24fc6263c
# Available At
#              hg pull -r 0f36e00ba083
unionrepo: properly handle hidden linkrev in revlog (issue5070)

The unionrepository have to do some special magic to handle linkrev of the
unioned filerev and manifestrev. That logic was done from a repoview and
obsolescence marker affecting bundled changeset could lead to a crash. We now
ensure we operate on unfiltered repository.
Martin von Zweigbergk - Feb. 24, 2016, 10:49 p.m.
queued these, thanks


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -209,18 +209,18 @@  class unionrepository(localrepo.localrep
         return self.changelog.rev(node)
     def manifest(self):
         return unionmanifest(self.svfs, self.repo2.svfs,
-                             self._clrev)
+                             self.unfiltered()._clrev)
     def url(self):
         return self._url
     def file(self, f):
         return unionfilelog(self.svfs, f, self.repo2.svfs,
-                            self._clrev, self)
+                            self.unfiltered()._clrev, self)
     def close(self):
     def cancopy(self):