This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: define "features" on repository instances (API)
ClosedPublic

Authored by indygreg on Sep 24 2018, 12:12 PM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Sep 24 2018, 12:12 PM
This revision was automatically updated to reflect the committed changes.