spectral created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION 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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D608

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -235,7 +235,8 @@
         success, data = d[:-1].split(" ", 1)
         if int(success):
             yield bin(data)
-        self._abort(error.RepoError(data))
+        else:
+            self._abort(error.RepoError(data))
 
     @batchable
     def heads(self):



To: spectral, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to