mercurial/wireprototypes.py
changeset 37728 564a3eec6e63
parent 37644 77c9ee77687c
child 37781 352932a11905
--- a/mercurial/wireprototypes.py	Sat Apr 14 15:38:11 2018 -0700
+++ b/mercurial/wireprototypes.py	Sun Apr 15 10:37:29 2018 -0700
@@ -106,6 +106,22 @@
     def __init__(self, v):
         self.value = v
 
+class v2errorresponse(object):
+    """Represents a command error for version 2 transports."""
+    def __init__(self, message, args=None):
+        self.message = message
+        self.args = args
+
+class v2streamingresponse(object):
+    """A response whose data is supplied by a generator.
+
+    The generator can either consist of data structures to CBOR
+    encode or a stream of already-encoded bytes.
+    """
+    def __init__(self, gen, compressible=True):
+        self.gen = gen
+        self.compressible = compressible
+
 # list of nodes encoding / decoding
 def decodelist(l, sep=' '):
     if l: