Show More
@@ -844,7 +844,8 b' def deltagroup(' | |||
|
844 | 844 | If topic is not None, progress detail will be generated using this |
|
845 | 845 | topic name (e.g. changesets, manifests, etc). |
|
846 | 846 | |
|
847 | See `storageutil.emitrevisions` for the doc on `sidedata_helpers`. | |
|
847 | See `revlogutil.sidedata.get_sidedata_helpers` for the doc on | |
|
848 | `sidedata_helpers`. | |
|
848 | 849 | """ |
|
849 | 850 | if not nodes: |
|
850 | 851 | return |
@@ -1212,7 +1213,8 b' class cgpacker(object):' | |||
|
1212 | 1213 | if generate is False, the state will be fully populated and no chunk |
|
1213 | 1214 | stream will be yielded |
|
1214 | 1215 | |
|
1215 | See `storageutil.emitrevisions` for the doc on `sidedata_helpers`. | |
|
1216 | See `revlogutil.sidedata.get_sidedata_helpers` for the doc on | |
|
1217 | `sidedata_helpers`. | |
|
1216 | 1218 | """ |
|
1217 | 1219 | clrevorder = {} |
|
1218 | 1220 | manifests = {} |
@@ -1317,7 +1319,8 b' class cgpacker(object):' | |||
|
1317 | 1319 | `source` is unused here, but is used by extensions like remotefilelog to |
|
1318 | 1320 | change what is sent based in pulls vs pushes, etc. |
|
1319 | 1321 | |
|
1320 | See `storageutil.emitrevisions` for the doc on `sidedata_helpers`. | |
|
1322 | See `revlogutil.sidedata.get_sidedata_helpers` for the doc on | |
|
1323 | `sidedata_helpers`. | |
|
1321 | 1324 | """ |
|
1322 | 1325 | repo = self._repo |
|
1323 | 1326 | mfl = repo.manifestlog |
@@ -2702,7 +2702,8 b' class revlog(object):' | |||
|
2702 | 2702 | argument controls whether to force compute deltas against both parents |
|
2703 | 2703 | for merges. By default, the current default is used. |
|
2704 | 2704 | |
|
2705 | See `storageutil.emitrevisions` for the doc on `sidedata_helpers`. | |
|
2705 | See `revlogutil.sidedata.get_sidedata_helpers` for the doc on | |
|
2706 | `sidedata_helpers`. | |
|
2706 | 2707 | """ |
|
2707 | 2708 | if deltareuse not in self.DELTAREUSEALL: |
|
2708 | 2709 | raise ValueError( |
@@ -96,6 +96,26 b' def deserialize_sidedata(blob):' | |||
|
96 | 96 | |
|
97 | 97 | |
|
98 | 98 | def get_sidedata_helpers(repo, remote_sd_categories, pull=False): |
|
99 | """ | |
|
100 | Returns a dictionary mapping revlog types to tuples of | |
|
101 | `(repo, computers, removers)`: | |
|
102 | * `repo` is used as an argument for computers | |
|
103 | * `computers` is a list of `(category, (keys, computer, flags)` that | |
|
104 | compute the missing sidedata categories that were asked: | |
|
105 | * `category` is the sidedata category | |
|
106 | * `keys` are the sidedata keys to be affected | |
|
107 | * `flags` is a bitmask (an integer) of flags to remove when | |
|
108 | removing the category. | |
|
109 | * `computer` is the function `(repo, store, rev, sidedata)` that | |
|
110 | returns a tuple of | |
|
111 | `(new sidedata dict, (flags to add, flags to remove))`. | |
|
112 | For example, it will return `({}, (0, 1 << 15))` to return no | |
|
113 | sidedata, with no flags to add and one flag to remove. | |
|
114 | * `removers` will remove the keys corresponding to the categories | |
|
115 | that are present, but not needed. | |
|
116 | If both `computers` and `removers` are empty, sidedata will simply not | |
|
117 | be transformed. | |
|
118 | """ | |
|
99 | 119 | # Computers for computing sidedata on-the-fly |
|
100 | 120 | sd_computers = collections.defaultdict(list) |
|
101 | 121 | # Computers for categories to remove from sidedata |
@@ -121,7 +141,7 b' def run_sidedata_helpers(store, sidedata' | |||
|
121 | 141 | the given helpers. |
|
122 | 142 | - `store`: the revlog this applies to (changelog, manifest, or filelog |
|
123 | 143 | instance) |
|
124 |
- `sidedata_helpers`: see ` |
|
|
144 | - `sidedata_helpers`: see `get_sidedata_helpers` | |
|
125 | 145 | - `sidedata`: previous sidedata at the given rev, if any |
|
126 | 146 | - `rev`: affected rev of `store` |
|
127 | 147 | """ |
@@ -364,24 +364,7 b' def emitrevisions(' | |||
|
364 | 364 | ``assumehaveparentrevisions`` |
|
365 | 365 | ``sidedata_helpers`` (optional) |
|
366 | 366 | If not None, means that sidedata should be included. |
|
367 | A dictionary of revlog type to tuples of `(repo, computers, removers)`: | |
|
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`. | |
|
367 | See `revlogutil.sidedata.get_sidedata_helpers`. | |
|
385 | 368 | """ |
|
386 | 369 | |
|
387 | 370 | fnode = store.node |
General Comments 0
You need to be logged in to leave comments.
Login now