At the moment, transactions support an optional extra data argument for
all files to be stored in addition to the original offset. This is used
in core only by the revlog inline to external data migration. It is used
to memoize the number of revisions before the transaction. That number
of can be computed during the walk easily, so drop the requirement.
Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG63edc384d3b7: transaction: drop per-file extra data support
rHG203f178a9dc8: transaction: drop per-file extra data support
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Comment Actions
I _think_ this is safe. But I would appreciate an extra set of eyes on the changed code in revlog.py. Essentially what's happening here is we were previously stuffing the number of revisions in the revlog in the in-memory data structure so we could recover the inline revlog if we had to roll back a .i -> .d revlog split that was incurred as part of the transaction.
The key line not changed in this patch is tr.replace(self.indexfile, trindex * self._io.size). And the new code gradually incrementing trindex as long as we're processing entries earlier than the .i offset recorded in the transaction seems correct to me.