changeset 11928:b69899dbad40

revlog: parentdelta flags for revlog index
author Pradeepkumar Gayam <in3xes@gmail.com>
date Tue, 10 Aug 2010 22:25:08 +0530
parents 9b842c8fb4df
children 1839a7518b0d
files mercurial/revlog.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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