equal
deleted
inserted
replaced
19 revlog, |
19 revlog, |
20 ) |
20 ) |
21 |
21 |
22 |
22 |
23 from mercurial.revlogutils import sidedata as sidedatamod |
23 from mercurial.revlogutils import sidedata as sidedatamod |
|
24 from mercurial.revlogutils import constants |
24 |
25 |
25 |
26 |
26 def compute_sidedata_1(repo, revlog, rev, sidedata, text=None): |
27 def compute_sidedata_1(repo, revlog, rev, sidedata, text=None): |
27 sidedata = sidedata.copy() |
28 sidedata = sidedata.copy() |
28 if text is None: |
29 if text is None: |
40 return sidedata |
41 return sidedata |
41 |
42 |
42 |
43 |
43 def reposetup(ui, repo): |
44 def reposetup(ui, repo): |
44 # Sidedata keys happen to be the same as the categories, easier for testing. |
45 # Sidedata keys happen to be the same as the categories, easier for testing. |
45 for kind in (b'changelog', b'manifest', b'filelog'): |
46 for kind in constants.ALL_KINDS: |
46 repo.register_sidedata_computer( |
47 repo.register_sidedata_computer( |
47 kind, |
48 kind, |
48 sidedatamod.SD_TEST1, |
49 sidedatamod.SD_TEST1, |
49 (sidedatamod.SD_TEST1,), |
50 (sidedatamod.SD_TEST1,), |
50 compute_sidedata_1, |
51 compute_sidedata_1, |