This is an archive of the discontinued Mercurial Phabricator instance.

copies: Keep changelog sidedata file open during copy tracing
ClosedPublic

Authored by SimonSapin on Jun 21 2021, 3:46 AM.

Details

Summary

Instead of having a callback that opens and closes that file many times,
a add and use a context manager method on the revlog class that keeps
files open for its duration.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

SimonSapin created this revision.Jun 21 2021, 3:46 AM

Can you comment on how many of them we keep open at a time?

One call to revlog.reading opens (if they aren’t open already) two files for the "main" data and for sidedata for that revlog. In the case of copy tracing, it is called on the changelog.

baymax updated this revision to Diff 28670.Jun 22 2021, 11:18 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)

pulkit accepted this revision.Jun 24 2021, 3:12 AM
This revision is now accepted and ready to land.Jun 24 2021, 3:12 AM