diff mercurial/bundle2.py @ 39850:d89d5bc06eaa

localrepo: define "features" on repository instances (API) There are a handful of attributes/methods on repository instances that describe the behavior of the repository. Furthermore, there is an unbound set of repository descriptors that we may wish to expose. For example, an extension may wish to add a descriptor and have monkeypatched functions look for the presence of an attribute before taking actions. This commit introduces a "features" mechanism to allow repositories to self-advertise an arbitrary set of strings that describe repository behavior or capabilities. We implement basic support for advertising a few features to give an idea of what I want to use this for. Differential Revision: https://phab.mercurial-scm.org/D4709
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 19 Sep 2018 14:36:57 -0700
parents 4a8bfec90ae6
children 1ea80ac13f19
line wrap: on
line diff
--- a/mercurial/bundle2.py	Wed Sep 19 17:27:37 2018 -0700
+++ b/mercurial/bundle2.py	Wed Sep 19 14:36:57 2018 -0700
@@ -1798,7 +1798,7 @@
                 "non-empty and does not use tree manifests"))
         op.repo.requirements.add('treemanifest')
         op.repo.svfs.options = localrepo.resolvestorevfsoptions(
-            op.repo.ui, op.repo.requirements)
+            op.repo.ui, op.repo.requirements, op.repo.features)
         op.repo._writerequirements()
     extrakwargs = {}
     targetphase = inpart.params.get('targetphase')