mercurial/wireprototypes.py
changeset 40020 ed919b90acda
parent 39814 d059cb669632
child 40021 c537144fdbef
--- a/mercurial/wireprototypes.py	Wed Sep 26 15:53:49 2018 -0700
+++ b/mercurial/wireprototypes.py	Wed Sep 26 17:16:27 2018 -0700
@@ -10,6 +10,9 @@
     hex,
 )
 from .i18n import _
+from .thirdparty import (
+    attr,
+)
 from . import (
     error,
     util,
@@ -352,3 +355,15 @@
                           ', '.sorted(validnames))
 
     return compengines
+
+@attr.s
+class encodedresponse(object):
+    """Represents response data that is already content encoded.
+
+    Wire protocol version 2 only.
+
+    Commands typically emit Python objects that are encoded and sent over the
+    wire. If commands emit an object of this type, the encoding step is bypassed
+    and the content from this object is used instead.
+    """
+    data = attr.ib()