hgext/evolve.py
changeset 877 cf35f38d6a10
parent 875 10867a8e27c6
child 879 85b3d54516a7
--- a/hgext/evolve.py	Mon Mar 10 22:08:21 2014 -0700
+++ b/hgext/evolve.py	Mon Mar 10 21:35:54 2014 -0700
@@ -2316,12 +2316,12 @@
         if k in ('heads', 'common'):
             opts[k] = wireproto.decodelist(v)
     obsdata = _getobsmarkersstream(repo, **opts)
-    length = '%20i' % len(obsdata.getvalue())
-    def data():
-        yield length
-        for c in proto.groupchunks(obsdata):
-            yield c
-    return wireproto.streamres(data())
+    finaldata = StringIO()
+    obsdata = obsdata.getvalue()
+    finaldata.write('%20i' % len(obsdata))
+    finaldata.write(obsdata)
+    finaldata.seek(0)
+    return wireproto.streamres(proto.groupchunks(finaldata))
 
 def _obsrelsethashtree(repo):
     cache = []