diff mercurial/localrepo.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 dbcb466d0065
children 324b4b10351e
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Sep 26 18:08:08 2018 -0700
+++ b/mercurial/localrepo.py	Tue Oct 02 12:40:39 2018 -0700
@@ -795,6 +795,7 @@
 def makefilestorage(requirements, features, **kwargs):
     """Produce a type conforming to ``ilocalrepositoryfilestorage``."""
     features.add(repository.REPO_FEATURE_REVLOG_FILE_STORAGE)
+    features.add(repository.REPO_FEATURE_STREAM_CLONE)
 
     if repository.NARROW_REQUIREMENT in requirements:
         return revlognarrowfilestorage