mercurial/streamclone.py
changeset 40028 51f10e6d66c7
parent 39850 d89d5bc06eaa
child 40338 af62936c2508
equal deleted inserted replaced
40027:83146d176c03 40028:51f10e6d66c7
    16     branchmap,
    16     branchmap,
    17     cacheutil,
    17     cacheutil,
    18     error,
    18     error,
    19     phases,
    19     phases,
    20     pycompat,
    20     pycompat,
       
    21     repository,
    21     store,
    22     store,
    22     util,
    23     util,
    23 )
    24 )
    24 
    25 
    25 def canperformstreamclone(pullop, bundle2=False):
    26 def canperformstreamclone(pullop, bundle2=False):
   176 
   177 
   177         repo.invalidate()
   178         repo.invalidate()
   178 
   179 
   179 def allowservergeneration(repo):
   180 def allowservergeneration(repo):
   180     """Whether streaming clones are allowed from the server."""
   181     """Whether streaming clones are allowed from the server."""
       
   182     if repository.REPO_FEATURE_STREAM_CLONE not in repo.features:
       
   183         return False
       
   184 
   181     if not repo.ui.configbool('server', 'uncompressed', untrusted=True):
   185     if not repo.ui.configbool('server', 'uncompressed', untrusted=True):
   182         return False
   186         return False
   183 
   187 
   184     # The way stream clone works makes it impossible to hide secret changesets.
   188     # The way stream clone works makes it impossible to hide secret changesets.
   185     # So don't allow this by default.
   189     # So don't allow this by default.