[Commented On] D11212: wireprotov1peer: update all rpcs to use the new batchable scheme

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Sat Sep 11 15:31:19 UTC 2021


valentin.gatienbaron added a comment.


  In D11212#174950 <https://phab.mercurial-scm.org/D11212#174950>, @danchr wrote:
  
  > In D11212#174786 <https://phab.mercurial-scm.org/D11212#174786>, @danchr wrote:
  >
  >> In D11212#174524 <https://phab.mercurial-scm.org/D11212#174524>, @Alphare wrote:
  >>
  >>> Thanks for bringing this up. Does that represent a large amount of work for you?
  >>
  >> Well, my main challenge here is that I have absolutely no idea what's going on — I don't have much experience with the very low levels of networking in Mercurial, or the (relatively) new peer API. It seems to me that the point of that code is, essentially, to provide a minimal repository or peer that does nothing. Could something like that be moved to Mercurial core?
  >
  > Okay, I managed to fix it:
  > https://foss.heptapod.net/mercurial/hg-git/-/merge_requests/130/diffs
  > https://foss.heptapod.net/mercurial/hg-git/-/merge_requests/131/diffs
  > Would one of you perhaps take a look at those changes and see if they make sense? I did it in the form of a decorator that just wraps a regular function returning a value. Something like that might be useful for core as well, and simplify a simple method like `branchmap()`.
  
  The two wrappers make sense, although it seems random to encode the query as `{}` in one case and `None` in other case (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).
  I can't really speak about the merge of the two classes.

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/db0b0209/attachment-0002.html>


More information about the Mercurial-patches mailing list