Page MenuHomePhabricator

wireprotov1peer: simplify the way batchable rpcs are defined
ClosedPublic

Authored by valentin.gatienbaron on Jul 25 2021, 4:32 PM.

Details

Summary

The scheme with futures/generator is confusing due to the way
communication is done by side effects, especially with two different
"future" objects. Just returning a request and a function to read the
response is easier to understand.

There are tests failures with the largefiles extension due to it
aliasing one rpc to another one, which gets fixed in the next commit.

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

Thanks for the patches, they look like a good idea, however we're in a freeze right now so we'll take a look in August.

Alphare accepted this revision.Aug 24 2021, 10:06 AM
Alphare added inline comments.
mercurial/wireprotov1peer.py
47–49

nit: s/wll/will/

This revision is now accepted and ready to land.Aug 24 2021, 10:06 AM
baymax updated this revision to Diff 29996.Aug 24 2021, 11:14 AM

✅ refresh by Heptapod after a successful CI run (🐙 💚)
⚠ This patch is intended for stable ⚠

Sorry for the noise, I should have skipped the CI refresh for the review queue, I'll take your updated patches.