This is an archive of the discontinued Mercurial Phabricator instance.

wireproto: do not abort after successful lookup
ClosedPublic

Authored by spectral on Sep 1 2017, 5:00 PM.

Details

Summary

As far as I can tell, this interface originally used 'return' here, so the
"fallthrough" to self._abort made sense. When it was switched to 'yield' this
didn't make sense, but doesn't impact most uses because the 'plain' wrapper in
peer.py's 'batchable' decorator only attempts to yield two items (args and
value).

When using iterbatch, however, it attempts to verify that the @batchable
generators only emit 2 results, by expecting a StopIteration when attempting to
access a third.

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

spectral created this revision.Sep 1 2017, 5:00 PM
quark accepted this revision.Sep 1 2017, 8:23 PM
quark added a subscriber: quark.

LGTM. I have checked there are no other suspicious _abort in this file.

This revision was automatically updated to reflect the committed changes.