Each repo will advertise the sidedata categories it requires (categories being
unique and canonical), and have a set of "computers", functions to generate
sidedata from (repo, revlog, rev, previous_sidedata), for a given category.
The set of computers can be a superset of the set of the wanted categories, but
not smaller: repos are expected to be coherent in their handling of sidedata.
Details
- Reviewers
marmoute - Group Reviewers
hg-reviewers - Commits
- rHGbc2519513ae0: sidedata-exchange: add `wanted_sidedata` and `sidedata_computers` to repos
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
mercurial/metadata.py | ||
---|---|---|
819–825 | We should use a registrar here (or at least a small helper function), that way, changing the implementation/processing will be simple in the futur. What do you think ? |
mercurial/bundle2.py | ||
---|---|---|
1815 | Can you add a small docstring to clarify the semantic of the function ? | |
mercurial/changegroup.py | ||
948 | If you want to test for None, explicitly test for None (is None). Otherwise you introduce subtle bugs for our future self. | |
mercurial/exchange.py | ||
423–435 | Why do we need multiples layer of loop here . I would expect an API to return a the appropriate object for a categories and that's it. So, what is going on here ? | |
1628 | Same question here. |
mercurial/exchange.py | ||
---|---|---|
423–435 | Categories are advertised as a flat list, but can affect any or all of the revlog kinds. This checks that a sidedata computer is registered for at least one revlog kind. |
mercurial/exchange.py | ||
---|---|---|
423–435 | Ha, yes… |
mercurial/exchange.py | ||
---|---|---|
1633–1641 | If I understand correctly, this piece of code will be reached only if a the local client flag some sidedata as "locally wanted" without having the means to generate them. right ? The message could be clearer: m = _(b'sidedata category requested by local side without local support: '%s'%s'") |
Can you add a small docstring to clarify the semantic of the function ?