comparison mercurial/bundlerepo.py @ 31835:4bafc80f827e

bundlerepo: build revlog index with flags This fixes bundlerevlog.flags(rev) for any revisions provided by the bundle. Now test-flagprocessor.t points us to another issue.
author Jun Wu <quark@fb.com>
date Thu, 06 Apr 2017 18:06:42 -0700
parents 433ab46f6bb4
children 4598e8f43e20
comparison
equal deleted inserted replaced
31834:433ab46f6bb4 31835:4bafc80f827e
63 p1 = chunkdata['p1'] 63 p1 = chunkdata['p1']
64 p2 = chunkdata['p2'] 64 p2 = chunkdata['p2']
65 cs = chunkdata['cs'] 65 cs = chunkdata['cs']
66 deltabase = chunkdata['deltabase'] 66 deltabase = chunkdata['deltabase']
67 delta = chunkdata['delta'] 67 delta = chunkdata['delta']
68 flags = chunkdata['flags']
68 69
69 size = len(delta) 70 size = len(delta)
70 start = bundle.tell() - size 71 start = bundle.tell() - size
71 72
72 link = linkmapper(cs) 73 link = linkmapper(cs)
85 raise LookupError(deltabase, self.indexfile, 86 raise LookupError(deltabase, self.indexfile,
86 _('unknown delta base')) 87 _('unknown delta base'))
87 88
88 baserev = self.rev(deltabase) 89 baserev = self.rev(deltabase)
89 # start, size, full unc. size, base (unused), link, p1, p2, node 90 # start, size, full unc. size, base (unused), link, p1, p2, node
90 e = (revlog.offset_type(start, 0), size, -1, baserev, link, 91 e = (revlog.offset_type(start, flags), size, -1, baserev, link,
91 self.rev(p1), self.rev(p2), node) 92 self.rev(p1), self.rev(p2), node)
92 self.index.insert(-1, e) 93 self.index.insert(-1, e)
93 self.nodemap[node] = n 94 self.nodemap[node] = n
94 self.bundlerevs.add(n) 95 self.bundlerevs.add(n)
95 chain = node 96 chain = node