Mercurial > hg
comparison mercurial/localrepo.py @ 14195:0013d3eeb826
revlog: remove support for parentdelta
We will introduce a more powerful and general delta concept instead,
called generaldelta.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 05 May 2011 12:55:12 +0200 |
parents | 4ab6e2d597cc |
children | 21b8ce4d3331 |
comparison
equal
deleted
inserted
replaced
14194:3a90fb3addc1 | 14195:0013d3eeb826 |
---|---|
19 propertycache = util.propertycache | 19 propertycache = util.propertycache |
20 | 20 |
21 class localrepository(repo.repository): | 21 class localrepository(repo.repository): |
22 capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey', | 22 capabilities = set(('lookup', 'changegroupsubset', 'branchmap', 'pushkey', |
23 'known', 'getbundle')) | 23 'known', 'getbundle')) |
24 supportedformats = set(('revlogv1', 'parentdelta')) | 24 supportedformats = set(('revlogv1',)) |
25 supported = supportedformats | set(('store', 'fncache', 'shared', | 25 supported = supportedformats | set(('store', 'fncache', 'shared', |
26 'dotencode')) | 26 'dotencode')) |
27 | 27 |
28 def __init__(self, baseui, path=None, create=0): | 28 def __init__(self, baseui, path=None, create=0): |
29 repo.repository.__init__(self) | 29 repo.repository.__init__(self) |
59 self.opener.append( | 59 self.opener.append( |
60 "00changelog.i", | 60 "00changelog.i", |
61 '\0\0\0\2' # represents revlogv2 | 61 '\0\0\0\2' # represents revlogv2 |
62 ' dummy changelog to prevent using the old repo layout' | 62 ' dummy changelog to prevent using the old repo layout' |
63 ) | 63 ) |
64 if self.ui.configbool('format', 'parentdelta', False): | |
65 requirements.append("parentdelta") | |
66 else: | 64 else: |
67 raise error.RepoError(_("repository %s not found") % path) | 65 raise error.RepoError(_("repository %s not found") % path) |
68 elif create: | 66 elif create: |
69 raise error.RepoError(_("repository %s already exists") % path) | 67 raise error.RepoError(_("repository %s already exists") % path) |
70 else: | 68 else: |
115 self._transref = self._lockref = self._wlockref = None | 113 self._transref = self._lockref = self._wlockref = None |
116 | 114 |
117 def _applyrequirements(self, requirements): | 115 def _applyrequirements(self, requirements): |
118 self.requirements = requirements | 116 self.requirements = requirements |
119 self.sopener.options = {} | 117 self.sopener.options = {} |
120 if 'parentdelta' in requirements: | |
121 self.sopener.options['parentdelta'] = 1 | |
122 | 118 |
123 def _writerequirements(self): | 119 def _writerequirements(self): |
124 reqfile = self.opener("requires", "w") | 120 reqfile = self.opener("requires", "w") |
125 for r in self.requirements: | 121 for r in self.requirements: |
126 reqfile.write("%s\n" % r) | 122 reqfile.write("%s\n" % r) |