# HG changeset patch # User Pradeepkumar Gayam # Date 1281459308 -19800 # Node ID b69899dbad4005e914aa112849eede267b449a39 # Parent 9b842c8fb4df625fc6b93f83ceedb5fb78c22893 revlog: parentdelta flags for revlog index diff -r 9b842c8fb4df -r b69899dbad40 mercurial/revlog.py --- a/mercurial/revlog.py Tue Aug 17 17:27:37 2010 +0200 +++ b/mercurial/revlog.py Tue Aug 10 22:25:08 2010 +0530 @@ -34,8 +34,9 @@ REVLOGNG_FLAGS = REVLOGNGINLINEDATA | REVLOGSHALLOW # revlog index flags +REVIDX_PARENTDELTA = 1 REVIDX_PUNCHED_FLAG = 2 -REVIDX_KNOWN_FLAGS = REVIDX_PUNCHED_FLAG +REVIDX_KNOWN_FLAGS = REVIDX_PUNCHED_FLAG | REVIDX_PARENTDELTA # amount of data read unconditionally, should be >= 4 # when not inline: threshold for using lazy index @@ -441,12 +442,16 @@ self.nodemap = {nullid: nullrev} self.index = [] self._shallowroot = shallowroot + self._parentdelta = 0 v = REVLOG_DEFAULT_VERSION if hasattr(opener, 'options') and 'defversion' in opener.options: v = opener.options['defversion'] if v & REVLOGNG: v |= REVLOGNGINLINEDATA + if v & REVLOGNG and 'parentdelta' in opener.options: + self._parentdelta = 1 + if shallowroot: v |= REVLOGSHALLOW