comparison mercurial/utils/storageutil.py @ 47086:8bd769b5c941

sidedata: move documentation about sidedata helpers to sidedata module Differential Revision: https://phab.mercurial-scm.org/D10361
author Rapha?l Gom?s <rgomes@octobus.net>
date Mon, 19 Apr 2021 11:22:24 +0200
parents 3aab2330b7d3
children 24ea3ef35238
comparison
equal deleted inserted replaced
47085:3aab2330b7d3 47086:8bd769b5c941
362 ``nodesorder`` 362 ``nodesorder``
363 ``revisiondata`` 363 ``revisiondata``
364 ``assumehaveparentrevisions`` 364 ``assumehaveparentrevisions``
365 ``sidedata_helpers`` (optional) 365 ``sidedata_helpers`` (optional)
366 If not None, means that sidedata should be included. 366 If not None, means that sidedata should be included.
367 A dictionary of revlog type to tuples of `(repo, computers, removers)`: 367 See `revlogutil.sidedata.get_sidedata_helpers`.
368 * `repo` is used as an argument for computers
369 * `computers` is a list of `(category, (keys, computer, flags)` that
370 compute the missing sidedata categories that were asked:
371 * `category` is the sidedata category
372 * `keys` are the sidedata keys to be affected
373 * `flags` is a bitmask (an integer) of flags to remove when
374 removing the category.
375 * `computer` is the function `(repo, store, rev, sidedata)` that
376 returns a tuple of
377 `(new sidedata dict, (flags to add, flags to remove))`.
378 For example, it will return `({}, (0, 1 << 15))` to return no
379 sidedata, with no flags to add and one flag to remove.
380 * `removers` will remove the keys corresponding to the categories
381 that are present, but not needed.
382 If both `computers` and `removers` are empty, sidedata are simply not
383 transformed.
384 Revlog types are `changelog`, `manifest` or `filelog`.
385 """ 368 """
386 369
387 fnode = store.node 370 fnode = store.node
388 frev = store.rev 371 frev = store.rev
389 372