Mercurial > public > mercurial-scm > hg
comparison mercurial/repository.py @ 40027:83146d176c03
localrepo: add repository feature when repo can be stream cloned
Right now, the wire protocol server assumes all repository objects can
be stream cloned (unless the stream clone feature is disabled via
config option).
But not all storage backends or repository objects may support stream
clone.
This commit defines a repository feature denoting whether stream clone
is supported. The feature is defined for revlog-based repositories,
which should currently be "all repositories."
Differential Revision: https://phab.mercurial-scm.org/D4852
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 02 Oct 2018 12:40:39 -0700 |
parents | c537144fdbef |
children | 8e398628a3f2 |
comparison
equal
deleted
inserted
replaced
40026:7e807b8a9e56 | 40027:83146d176c03 |
---|---|
25 REPO_FEATURE_REVLOG_FILE_STORAGE = b'revlogfilestorage' | 25 REPO_FEATURE_REVLOG_FILE_STORAGE = b'revlogfilestorage' |
26 # The storage part of the repository is shared from an external source. | 26 # The storage part of the repository is shared from an external source. |
27 REPO_FEATURE_SHARED_STORAGE = b'sharedstore' | 27 REPO_FEATURE_SHARED_STORAGE = b'sharedstore' |
28 # LFS supported for backing file storage. | 28 # LFS supported for backing file storage. |
29 REPO_FEATURE_LFS = b'lfs' | 29 REPO_FEATURE_LFS = b'lfs' |
30 # Repository supports being stream cloned. | |
31 REPO_FEATURE_STREAM_CLONE = b'streamclone' | |
30 | 32 |
31 class ipeerconnection(interfaceutil.Interface): | 33 class ipeerconnection(interfaceutil.Interface): |
32 """Represents a "connection" to a repository. | 34 """Represents a "connection" to a repository. |
33 | 35 |
34 This is the base interface for representing a connection to a repository. | 36 This is the base interface for representing a connection to a repository. |