[PATCH 5 of 5 filtering part 2 V2] clfilter: fix `nodemap` usage in `getbundle`
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Mon Dec 10 11:30:25 CST 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1355159561 -3600
# Node ID 6e54226c69bb73b0f8f140560379e3eeefcffd9c
# Parent 0ffb3f54b38648807bb24f020db9fbde84615c52
clfilter: fix `nodemap` usage in `getbundle`
With the current implementation, `changelog.nodemap` is not filtered. So some
filtered changeset in common are not filtered by `n in nodemap`. This leads to
crash lower in the stack when the bundle generation try to access those node on
a filtered changelog.
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2198,12 +2198,12 @@ class localrepository(object):
The nodes in common might not all be known locally due to the way the
current discovery protocol works.
"""
cl = self.changelog
if common:
- nm = cl.nodemap
- common = [n for n in common if n in nm]
+ hasnode = cl.hasnode
+ common = [n for n in common if hasnode(n)]
else:
common = [nullid]
if not heads:
heads = cl.heads()
return self.getlocalbundle(source,
More information about the Mercurial-devel
mailing list