[PATCH 2 of 3 STABLE] bundlerepo: properly handle hidden linkrev in manifestlog (issue4945)
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Feb 23 07:13:25 EST 2016
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1456180494 -3600
# Mon Feb 22 23:34:54 2016 +0100
# Branch stable
# Node ID 2aa1522e1018ff38639c4e6841afbaa24fc6263c
# Parent 50c9e7028d6e84bd7566ff4db618631c7acaeacf
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
# hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 2aa1522e1018
bundlerepo: properly handle hidden linkrev in manifestlog (issue4945)
The bundlerepository have to do some special magic to handle linkrev of the
bundled manifest. 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.
diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -323,11 +323,12 @@ class bundlerepository(localrepo.localre
@localrepo.unfilteredpropertycache
def manifest(self):
self.bundle.seek(self.manstart)
# consume the header if it exists
self.bundle.manifestheader()
- m = bundlemanifest(self.svfs, self.bundle, self.changelog.rev)
+ linkmapper = self.unfiltered().changelog.rev
+ m = bundlemanifest(self.svfs, self.bundle, linkmapper)
# XXX: hack to work with changegroup3, but we still don't handle
# tree manifests correctly
if self.bundle.version == "03":
self.bundle.filelogheader()
self.filestart = self.bundle.tell()
More information about the Mercurial-devel
mailing list