# HG changeset patch # User Jun Wu # Date 2017-04-07 01:06:42 # Node ID 4bafc80f827ee61c43b6a6ea1a7990477384b283 # Parent 433ab46f6bb4f86d8776a909d3dc180d33a868e3 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. diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -65,6 +65,7 @@ class bundlerevlog(revlog.revlog): cs = chunkdata['cs'] deltabase = chunkdata['deltabase'] delta = chunkdata['delta'] + flags = chunkdata['flags'] size = len(delta) start = bundle.tell() - size @@ -87,7 +88,7 @@ class bundlerevlog(revlog.revlog): baserev = self.rev(deltabase) # start, size, full unc. size, base (unused), link, p1, p2, node - e = (revlog.offset_type(start, 0), size, -1, baserev, link, + e = (revlog.offset_type(start, flags), size, -1, baserev, link, self.rev(p1), self.rev(p2), node) self.index.insert(-1, e) self.nodemap[node] = n diff --git a/tests/test-flagprocessor.t b/tests/test-flagprocessor.t --- a/tests/test-flagprocessor.t +++ b/tests/test-flagprocessor.t @@ -188,7 +188,8 @@ 4 changesets found $ hg --config extensions.strip= strip -r 2 --no-backup --force -q $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )' - abort: integrity check failed on data/base64.i:2! + Traceback (most recent call last): + mercurial.mpatch.mpatchError: invalid patch $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q 2>&1 | egrep -v '^(\*\*| )' Traceback (most recent call last):