##// END OF EJS Templates
revlog: linearize created changegroups in generaldelta revlogs...
revlog: linearize created changegroups in generaldelta revlogs This greatly improves the speed of the bundling process, and often reduces the bundle size considerably. (Although if the repository is already ordered, this has little effect on both time and bundle size.) For non-generaldelta clients, the reduced bundle size translates to a reduced repository size, similar to shrinking the revlogs (which uses the exact same algorithm). For generaldelta clients the difference is minor. When the new bundle format comes, reordering will not be necessary since we can then store the deltaparent relationsships directly. The eventual default behavior for clients and servers is presented in the table below, where "new" implies support for GD as well as the new bundle format: old client new client old server old bundle, no reorder old bundle, no reorder new server, non-GD old bundle, no reorder[1] old bundle, no reorder[2] new server, GD old bundle, reorder[3] new bundle, no reorder[4] [1] reordering is expensive on the server in this case, skip it [2] client can choose to do its own redelta here [3] reordering is needed because otherwise the pull does a lot of extra work on the server [4] reordering isn't needed because client can get deltabase in bundle format Currently, the default is to reorder on GD-servers, and not otherwise. A new setting, bundle.reorder, has been added to override the default reordering behavior. It can be set to either 'auto' (the default), or any true or false value as a standard boolean setting, to either force the reordering on or off regardless of generaldelta. Some timing data from a relatively branch test repository follows. All bundling is done with --all --type none options. Non-generaldelta, non-shrunk repo: ----------------------------------- Size: 276M Without reorder (default): Bundle time: 14.4 seconds Bundle size: 939M With reorder: Bundle time: 1 minute, 29.3 seconds Bundle size: 381M Generaldelta, non-shrunk repo: ----------------------------------- Size: 87M Without reorder: Bundle time: 2 minutes, 1.4 seconds Bundle size: 939M With reorder (default): Bundle time: 25.5 seconds Bundle size: 381M

File last commit:

r13382:d747774c default
r14365:a8e3931e default
Show More
repo.py
40 lines | 1.2 KiB | text/x-python | PythonLexer
mpm@selenic.com
Break apart hg.py...
r1089 # repo.py - repository base classes for mercurial
#
Thomas Arendsen Hein
Updated copyright notices and add "and others" to "hg version"
r4635 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
Vadim Gelfer
update copyrights.
r2859 # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com>
mpm@selenic.com
Break apart hg.py...
r1089 #
Martin Geisler
updated license to be explicit about GPL version 2
r8225 # This software may be used and distributed according to the terms of the
Matt Mackall
Update license to GPLv2+
r10263 # GNU General Public License version 2 or any later version.
mpm@selenic.com
Break apart hg.py...
r1089
Benoit Boissinot
import gettext since '_' is used
r5455 from i18n import _
Peter Arrenbrecht
cleanup: drop unused imports
r7873 import error
Benoit Boissinot
import gettext since '_' is used
r5455
Vadim Gelfer
add support for streaming clone....
r2612 class repository(object):
def capable(self, name):
'''tell whether repo supports named capability.
return False if not supported.
if boolean capability, return True.
if string capability, return string.'''
Bryan O'Sullivan
Push capability checking into protocol-level code.
r5259 if name in self.capabilities:
return True
Vadim Gelfer
add support for streaming clone....
r2612 name_eq = name + '='
for cap in self.capabilities:
if cap.startswith(name_eq):
return cap[len(name_eq):]
return False
Bryan O'Sullivan
Push capability checking into protocol-level code.
r5259
def requirecap(self, name, purpose):
'''raise an exception if the given capability is not present'''
if not self.capable(name):
Matt Mackall
error: move repo errors...
r7637 raise error.CapabilityError(
_('cannot %s; remote repository does not '
'support the %r capability') % (purpose, name))
John Mulligan
Add default local() and cancopy() methods to repository base class
r6311
def local(self):
return False
def cancopy(self):
return self.local()
Adrian Buehlmann
Make sure bundlerepo doesn't leak temp files (issue2491)...
r13382
def close(self):
pass