mercurial/wireproto.py
changeset 20902 1e4fda2f5cf1
parent 20775 982f13bef503
child 20903 8d477543882b
--- a/mercurial/wireproto.py	Tue Apr 01 18:56:19 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 11:37:42 2014 -0700
@@ -327,19 +327,38 @@
 
 # server side
 
+# wire protocol command can either return a string or one of these classes.
 class streamres(object):
+    """wireproto reply: binary stream
+
+    The call was successful and the result is a stream.
+    Iterate on the `self.gen` attribute to retrieve chunks.
+    """
     def __init__(self, gen):
         self.gen = gen
 
 class pushres(object):
+    """wireproto reply: success with simple integer return
+
+    The call was successful and returned an integer contained in `self.res`.
+    """
     def __init__(self, res):
         self.res = res
 
 class pusherr(object):
+    """wireproto reply: failure
+
+    The call failed. The `self.res` attribute contains the error message.
+    """
     def __init__(self, res):
         self.res = res
 
 class ooberror(object):
+    """wireproto reply: failure of a batch of operation
+
+    Something failed during a batch call. The error message is stored in
+    `self.message`.
+    """
     def __init__(self, message):
         self.message = message