This is an archive of the discontinued Mercurial Phabricator instance.

undo: cover lock error cases and add timeout
ClosedPublic

Authored by felixmerk on Jul 31 2017, 5:50 PM.
Tags
None
Subscribers

Details

Reviewers
quark
stash
Group Reviewers
Restricted Project
Commits
rFBHGXcaf5efb61c75: undo: cover lock error cases and add timeout
Summary

Lock error handling reduces likelyhood undo hangs or breaks other commands.
Fixes known bug of undo in read-only repo. Undo is not neccesary for mercurial
to work and handles missing data (decently) well. Failing silently (potentially
logging to scuba for timeouts) is acceptable, since if the issue is real we will
fail not silently when trying to undo.

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

felixmerk created this revision.Jul 31 2017, 5:50 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 31 2017, 5:50 PM
quark requested changes to this revision.Jul 31 2017, 6:21 PM
quark added a subscriber: quark.
quark added inline comments.
hgext3rd/undo.py
87

This could raise OSError that is not handled.

100

nit: need \n.

104

\n

This revision now requires changes to proceed.Jul 31 2017, 6:21 PM
felixmerk edited edge metadata.Jul 31 2017, 6:49 PM
felixmerk updated this revision to Diff 468.
stash accepted this revision.Aug 1 2017, 10:32 AM
quark accepted this revision.Aug 1 2017, 2:38 PM

Please add the missing \n before landing this.

hgext3rd/undo.py
90

\n

This revision is now accepted and ready to land.Aug 1 2017, 2:38 PM
This revision was automatically updated to reflect the committed changes.