This is an archive of the discontinued Mercurial Phabricator instance.

repack: better error handling
ClosedPublic

Authored by durham on Jul 12 2017, 12:51 PM.
Tags
None
Subscribers
None

Details

Reviewers
quark
Group Reviewers
Restricted Project
Commits
rFBHGX09ed28810217: repack: better error handling
Summary

We've seen certain machines end up with just datapack files and no dataidx
files. While we can't repro this, the only time this could possibly happen is
between the rename of the two temp files. So let's add error handling around
that logic.

Test Plan

Ran the tests. Manually inserted an exception between the renames, ran the tests with --keep-tmpdir, and verified there were no packs left over when the exception fired.

Diff Detail

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

Event Timeline

durham created this revision.Jul 12 2017, 12:51 PM
durham edited the test plan for this revision. (Show Details)Jul 12 2017, 12:55 PM
quark accepted this revision.Jul 13 2017, 1:26 PM
This revision is now accepted and ready to land.Jul 13 2017, 1:26 PM
This revision was automatically updated to reflect the committed changes.