equal
deleted
inserted
replaced
70 rl.opener, |
70 rl.opener, |
71 target=rl.target, |
71 target=rl.target, |
72 radix=rl.radix, |
72 radix=rl.radix, |
73 postfix=b'tmpcensored', |
73 postfix=b'tmpcensored', |
74 censorable=True, |
74 censorable=True, |
|
75 data_config=rl.data_config, |
|
76 delta_config=rl.delta_config, |
|
77 feature_config=rl.feature_config, |
|
78 may_inline=rl._inline, |
75 ) |
79 ) |
76 newrl._format_version = rl._format_version |
80 # inline splitting will prepare some transaction work that will get |
77 newrl._format_flags = rl._format_flags |
81 # confused by the final file move. So if there is a risk of not being |
78 newrl.delta_config.general_delta = rl.delta_config.general_delta |
82 # inline at the end, we prevent the new revlog to be inline in the first |
79 newrl._parse_index = rl._parse_index |
83 # place. |
|
84 assert not (newrl._inline and not rl._inline) |
80 |
85 |
81 for rev in rl.revs(): |
86 for rev in rl.revs(): |
82 node = rl.node(rev) |
87 node = rl.node(rev) |
83 p1, p2 = rl.parents(node) |
88 p1, p2 = rl.parents(node) |
84 |
89 |
120 tr.addbackup(rl._indexfile, location=b'store') |
125 tr.addbackup(rl._indexfile, location=b'store') |
121 if not rl._inline: |
126 if not rl._inline: |
122 tr.addbackup(rl._datafile, location=b'store') |
127 tr.addbackup(rl._datafile, location=b'store') |
123 |
128 |
124 rl.opener.rename(newrl._indexfile, rl._indexfile) |
129 rl.opener.rename(newrl._indexfile, rl._indexfile) |
125 if not rl._inline: |
130 if newrl._inline: |
|
131 assert rl._inline |
|
132 else: |
|
133 assert not rl._inline |
126 rl.opener.rename(newrl._datafile, rl._datafile) |
134 rl.opener.rename(newrl._datafile, rl._datafile) |
127 |
135 |
128 rl.clearcaches() |
136 rl.clearcaches() |
129 chunk_cache = rl._loadindex() |
137 chunk_cache = rl._loadindex() |
130 rl._load_inner(chunk_cache) |
138 rl._load_inner(chunk_cache) |