Mercurial > hg
view mercurial/interfaces/util.py @ 49779:7d6c8943353a stable
hg: show the correct message when cloning an LFS repo with extension disabled
The `extensions._disabledpaths()` doesn't handle fetching help from `__index__`,
so it returns an empty dictionary of paths. That means None is always returned
from `extensions.disabled_help()` when embedding resources inside the pyoxidizer
or py2exe binary, regardless of the arg or if is an external extension stored in
the filesystem. And that means wrongly telling the user with an explicitly
disabled LFS extension that it will be enabled locally upon cloning from an LFS
remote. That causes test-lfs-serve.t:295 to fail.
This effectively reverts most of the rest of 843418dc0b1b, while keeping the
help text change in place (which was specifically identified as a problem).
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 05 Dec 2022 15:14:33 -0500 |
parents | 642e31cb55f0 |
children | f4733654f144 |
line wrap: on
line source
# util.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 .. import encoding if encoding.environ.get(b'HGREALINTERFACES'): from ..thirdparty.zope import interface as zi Attribute = zi.Attribute Interface = zi.Interface implementer = zi.implementer else: class Attribute: def __init__(self, __name__, __doc__=b''): pass class Interface: def __init__( self, name, bases=(), attrs=None, __doc__=None, __module__=None ): pass def implementer(*ifaces): def wrapper(cls): return cls return wrapper