Mercurial > hg-stable
diff mercurial/revlog.py @ 27433:12f727a5b434
changegroup: add flags field to cg3 delta header
This lets revlog flags be transmitted over the wire. Right now this is
useful for censored nodes and for narrowhg's ellipsis nodes.
author | Mike Edgar <adgar@google.com> |
---|---|
date | Mon, 14 Dec 2015 15:55:12 -0500 |
parents | 8f016345e6b0 |
children | 77c51a56392e |
line wrap: on
line diff
--- a/mercurial/revlog.py Fri Dec 11 11:23:49 2015 -0500 +++ b/mercurial/revlog.py Mon Dec 14 15:55:12 2015 -0500 @@ -1572,6 +1572,7 @@ cs = chunkdata['cs'] deltabase = chunkdata['deltabase'] delta = chunkdata['delta'] + flags = chunkdata['flags'] or REVIDX_DEFAULT_FLAGS content.append(node) @@ -1602,8 +1603,7 @@ raise error.CensoredBaseError(self.indexfile, self.node(baserev)) - flags = REVIDX_DEFAULT_FLAGS - if self._peek_iscensored(baserev, delta, flush): + if not flags and self._peek_iscensored(baserev, delta, flush): flags |= REVIDX_ISCENSORED # We assume consumers of addrevisioncb will want to retrieve