Mercurial > hg-stable
comparison mercurial/localrepo.py @ 18086:739c88ff043c
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.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Mon, 10 Dec 2012 18:12:41 +0100 |
parents | e411fd79ca69 |
children | ff36650e4238 |
comparison
equal
deleted
inserted
replaced
18085:4c53f015564f | 18086:739c88ff043c |
---|---|
2105 The nodes in common might not all be known locally due to the way the | 2105 The nodes in common might not all be known locally due to the way the |
2106 current discovery protocol works. | 2106 current discovery protocol works. |
2107 """ | 2107 """ |
2108 cl = self.changelog | 2108 cl = self.changelog |
2109 if common: | 2109 if common: |
2110 nm = cl.nodemap | 2110 hasnode = cl.hasnode |
2111 common = [n for n in common if n in nm] | 2111 common = [n for n in common if hasnode(n)] |
2112 else: | 2112 else: |
2113 common = [nullid] | 2113 common = [nullid] |
2114 if not heads: | 2114 if not heads: |
2115 heads = cl.heads() | 2115 heads = cl.heads() |
2116 return self.getlocalbundle(source, | 2116 return self.getlocalbundle(source, |