This is an archive of the discontinued Mercurial Phabricator instance.

treemanifest: don't error out if a local commit doesn't have a tree
ClosedPublic

Authored by durham on Sep 22 2017, 12:23 AM.
Tags
None
Subscribers

Details

Summary

In hybrid tree/flat mode, if a local commit accidentally got marked as public,
then we would attempt to access the server, which of course didn't have the
commit and failed. This caused an error on the client, when in reality we
should've just fallen back to the flat manifest. Let's eat the error and the
message in this case.

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.Sep 22 2017, 12:23 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptSep 22 2017, 12:23 AM
quark added a subscriber: quark.Sep 22 2017, 12:48 AM
quark added inline comments.
fastmanifest/implementation.py
166

except Exception?

treemanifest/__init__.py
1030

I think it will look safer if popbuffer is in a finally block (same as above). This may eat everything if _cleanup raises.

quark accepted this revision.Sep 22 2017, 12:48 AM

Suppose popbuffer gets moved to finally.

This revision is now accepted and ready to land.Sep 22 2017, 12:48 AM
This revision was automatically updated to reflect the committed changes.