diff mercurial/wireproto.py @ 12337:6a6149487817

bundle: encapsulate all bundle streams in unbundle class
author Matt Mackall <mpm@selenic.com>
date Mon, 20 Sep 2010 14:32:21 -0500
parents d7fff529d85d
children cb9e1d1c34ea
line wrap: on
line diff
--- a/mercurial/wireproto.py	Sun Sep 19 13:12:45 2010 -0500
+++ b/mercurial/wireproto.py	Mon Sep 20 14:32:21 2010 -0500
@@ -102,14 +102,15 @@
     def changegroup(self, nodes, kind):
         n = encodelist(nodes)
         f = self._callstream("changegroup", roots=n)
-        return self._decompress(f)
+        return changegroupmod.unbundle10(self._decompress(f), 'UN')
 
     def changegroupsubset(self, bases, heads, kind):
         self.requirecap('changegroupsubset', _('look up remote changes'))
         bases = encodelist(bases)
         heads = encodelist(heads)
-        return self._decompress(self._callstream("changegroupsubset",
-                                                 bases=bases, heads=heads))
+        f = self._callstream("changegroupsubset",
+                             bases=bases, heads=heads)
+        return changegroupmod.unbundle10(self._decompress(f), 'UN')
 
     def unbundle(self, cg, heads, source):
         '''Send cg (a readable file-like object representing the