hgext/remotefilelog/shallowbundle.py
changeset 46847 47a9527731c3
parent 46724 a41565bef69f
child 47055 d55b71393907
equal deleted inserted replaced
46846:2819df466cae 46847:47a9527731c3
   101         if not shallowutil.isenabled(repo):
   101         if not shallowutil.isenabled(repo):
   102             return AllFiles
   102             return AllFiles
   103 
   103 
   104         if source == b"push" or source == b"bundle":
   104         if source == b"push" or source == b"bundle":
   105             return AllFiles
   105             return AllFiles
       
   106 
       
   107         # We won't actually strip the files, but we should put them in any
       
   108         # backup bundle generated by strip (especially for cases like narrow's
       
   109         # `hg tracked --removeinclude`, as failing to do so means that the
       
   110         # "saved" changesets during a strip won't have their files reapplied and
       
   111         # thus their linknode adjusted, if necessary).
       
   112         if source == b"strip":
       
   113             cfg = repo.ui.config(b'remotefilelog', b'strip.includefiles')
       
   114             if cfg == b'local':
       
   115                 return LocalFiles
       
   116             elif cfg != b'none':
       
   117                 return AllFiles
   106 
   118 
   107         caps = self._bundlecaps or []
   119         caps = self._bundlecaps or []
   108         if source == b"serve" or source == b"pull":
   120         if source == b"serve" or source == b"pull":
   109             if constants.BUNDLE2_CAPABLITY in caps:
   121             if constants.BUNDLE2_CAPABLITY in caps:
   110                 return LocalFiles
   122                 return LocalFiles