143 opts = wireproto.options('', ['heads', 'common'], others) |
143 opts = wireproto.options('', ['heads', 'common'], others) |
144 for k, v in opts.iteritems(): |
144 for k, v in opts.iteritems(): |
145 if k in ('heads', 'common'): |
145 if k in ('heads', 'common'): |
146 opts[k] = wireproto.decodelist(v) |
146 opts[k] = wireproto.decodelist(v) |
147 obsdata = _getobsmarkersstream(repo, **opts) |
147 obsdata = _getobsmarkersstream(repo, **opts) |
148 length = '%20i' % len(obsdata.getvalue()) |
148 finaldata = StringIO() |
149 def data(): |
149 obsdata = obsdata.getvalue() |
150 yield length |
150 finaldata.write('%20i' % len(obsdata)) |
151 for c in proto.groupchunks(obsdata): |
151 finaldata.write(obsdata) |
152 yield c |
152 finaldata.seek(0) |
153 return wireproto.streamres(data()) |
153 return wireproto.streamres(proto.groupchunks(finaldata)) |
154 |
154 |
155 |
155 |
156 # from evolve extension: 1a23c7c52a43 |
156 # from evolve extension: 1a23c7c52a43 |
157 def _obsrelsethashtree(repo): |
157 def _obsrelsethashtree(repo): |
158 """Build an obshash for every node in a repo |
158 """Build an obshash for every node in a repo |