--- a/mercurial/bundlerepo.py Wed Jan 16 20:41:32 2013 +0100
+++ b/mercurial/bundlerepo.py Wed Jan 16 20:41:34 2013 +0100
@@ -25,8 +25,7 @@
# (start).
#
# basemap is indexed with revisions coming from the bundle, and it
- # maps to the corresponding node that is the base of the corresponding
- # delta.
+ # maps to the node that is the base of the corresponding delta.
#
# To differentiate a rev in the bundle from a rev in the revlog, we
# check revision against basemap.
@@ -37,7 +36,7 @@
n = len(self)
self.disktiprev = n - 1
chain = None
- self.bundlenodes = []
+ self.bundlerevs = set() # used by 'bundle()' revset expression
while True:
chunkdata = bundle.deltachunk(chain)
if not chunkdata:
@@ -53,10 +52,10 @@
start = bundle.tell() - size
link = linkmapper(cs)
- self.bundlenodes.append(node)
if node in self.nodemap:
# this can happen if two branches make the same change
chain = node
+ self.bundlerevs.add(self.nodemap[node])
continue
for p in (p1, p2):
@@ -69,6 +68,7 @@
self.basemap[n] = deltabase
self.index.insert(-1, e)
self.nodemap[node] = n
+ self.bundlerevs.add(n)
chain = node
n += 1