##// END OF EJS Templates
revlog: always enable generaldelta on version 2 revlogs...
revlog: always enable generaldelta on version 2 revlogs This commit starts the process of diverging version 2 revlogs from version 1 revlogs. generaldelta is a useful feature and has been enabled by default for ages. I can't think of a good reason why the feature should be disabled. Yes, it is true changelogs today don't have generaldelta enabled. But that's because they don't have delta chains enabled, so generaldelta makes no sense there. This commit makes generaldelta always enabled on version 2 revlogs. As part of this, one-off code in changelog.py mucking with revlog.version had to be made conditional on the revlog version, as we don't want to change revlog feature flags on version 2 revlogs. The fact this code exists is horrible and stems from revlog options being shared by the opener. We probably want a better API here. But that can wait for another patch. Differential Revision: https://phab.mercurial-scm.org/D5561

File last commit:

r37828:856f381a stable
r41238:e7a2cc84 default
Show More
interfaceutil.py
40 lines | 1.1 KiB | text/x-python | PythonLexer
# interfaceutil.py - Utilities for declaring interfaces.
#
# Copyright 2018 Gregory Szorc <gregory.szorc@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# zope.interface imposes a run-time cost due to module import overhead and
# bookkeeping for declaring interfaces. So, we use stubs for various
# zope.interface primitives unless instructed otherwise.
from __future__ import absolute_import
from .. import (
encoding,
)
if encoding.environ.get('HGREALINTERFACES'):
from ..thirdparty.zope import (
interface as zi,
)
Attribute = zi.Attribute
Interface = zi.Interface
implementer = zi.implementer
else:
class Attribute(object):
def __init__(self, __name__, __doc__=''):
pass
class Interface(object):
def __init__(self, name, bases=(), attrs=None, __doc__=None,
__module__=None):
pass
def implementer(*ifaces):
def wrapper(cls):
return cls
return wrapper