[Commented On] D11212: wireprotov1peer: update all rpcs to use the new batchable scheme
danchr (Dan Villiom Podlaski Christiansen)
phabricator at mercurial-scm.org
Sat Sep 11 16:12:27 UTC 2021
danchr added a comment.
In D11212#174951 <https://phab.mercurial-scm.org/D11212#174951>, @valentin.gatienbaron wrote:
> The two wrappers make sense, although it seems random to encode the query as `{}` in one case and `None` in other case
Good point! Since both work, I simplified it to just always use `None`.
> (I also don't really understand why the old wrapper yields twice instead of yield+return, but I guess it doesn't really make a difference).
Well, `yield`+`return` is a syntax error in Python 2.7, and just yielding once raises some odd exceptions I'd rather not dig into for legacy code.
> I can't really speak about the merge of the two classes.
Thanks for taking a look anyway! (AFAICT the two classes were a somewhat convoluted way of handling compatibility with 4.8 and earlier; with the decorator, it's no longer needed.)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11212/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11212
To: valentin.gatienbaron, #hg-reviewers, Alphare
Cc: danchr, Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210911/1063e1d2/attachment-0002.html>
More information about the Mercurial-patches
mailing list