Page MenuHomePhabricator

revlog: open files in 'r+' instead of 'a+'
Needs ReviewPublic

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

Details

Reviewers
indygreg
Group Reviewers
hg-reviewers
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
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

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

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

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

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