[PATCH 5 of 7] localrepo: add parentdelta to requires only if enabled in config file
in3xes at gmail.com
in3xes at gmail.com
Fri Aug 6 07:00:37 UTC 2010
# HG changeset patch
# User Pradeepkumar Gayam <in3xes at gmail.com>
# Date 1281077224 -19800
# Node ID 42a7b033b1ad8a2583c753eb7f67f517bee8a843
# Parent a3ae8ae82cbae32f9d5abf367c5cf8affb73040f
localrepo: add parentdelta to requires only if enabled in config file
diff -r a3ae8ae82cba -r 42a7b033b1ad mercurial/localrepo.py
--- a/mercurial/localrepo.py Fri Aug 06 12:15:38 2010 +0530
+++ b/mercurial/localrepo.py Fri Aug 06 12:17:04 2010 +0530
@@ -21,7 +21,7 @@
class localrepository(repo.repository):
capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey'))
- supported = set('revlogv1 store fncache shared'.split())
+ supported = set('revlogv1 store fncache shared parentdelta'.split())
def __init__(self, baseui, path=None, create=0):
repo.repository.__init__(self)
@@ -55,6 +55,8 @@
'\0\0\0\2' # represents revlogv2
' dummy changelog to prevent using the old repo layout'
)
+ if self.ui.configbool('format', 'parentdelta', False):
+ requirements.append("parentdelta")
reqfile = self.opener("requires", "w")
for r in requirements:
reqfile.write("%s\n" % r)
@@ -91,6 +93,8 @@
self.sjoin = self.store.join
self.opener.createmode = self.store.createmode
self.sopener.options = {}
+ if 'parentdelta' in requirements:
+ self.sopener.options['parentdelta'] = 1
# These two define the set of tags for this repository. _tags
# maps tag name to node; _tagtypes maps tag name to 'global' or
More information about the Mercurial-devel
mailing list