Page MenuHomePhabricator

revlog: open files in 'r+' instead of 'a+'
ClosedPublic

Authored by marmoute on May 3 2021, 7:52 AM.

Details

Summary

The code doing actual writing is already doing the necessary seeking, so we
could safely use 'r+'. This make the file objecs usable in more situation, like
updating the sidedata information during pull.

revlog: forcibly move the file cursor at the right location before writing

This is a paranoid change in case the changelog computation moved the cursors
under our feets.

This is not known to happens right now.

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

marmoute created this revision.May 3 2021, 7:52 AM
baymax updated this revision to Diff 27523.May 3 2021, 9:44 PM

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

baymax updated this revision to Diff 27854.May 11 2021, 1:42 PM

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

baymax updated this revision to Diff 27980.May 17 2021, 7:02 AM

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

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.