diff -r 64b55bffc1c0 -r 03fae9048fa1 mercurial/revlog.py --- a/mercurial/revlog.py Sun Nov 27 20:44:52 2016 -0500 +++ b/mercurial/revlog.py Mon Nov 28 04:34:01 2016 -0800 @@ -72,6 +72,8 @@ return int(q & 0xFFFF) def offset_type(offset, type): + if (type & ~REVIDX_KNOWN_FLAGS) != 0: + raise ValueError('unknown revlog index flags') return long(long(offset) << 16 | type) _nullhash = hashlib.sha1(nullid)