mercurial/changegroup.py
changeset 14144 3c3c53d8343a
parent 14143 da635d3c5620
child 14494 1ffeeb91c55d
--- a/mercurial/changegroup.py	Sat Apr 30 11:03:28 2011 +0200
+++ b/mercurial/changegroup.py	Sat Apr 30 19:01:24 2011 +0200
@@ -159,10 +159,21 @@
             self.callback()
         return l - 4
 
-    def chunk(self):
-        """return the next chunk from changegroup 'source' as a string"""
+    def changelogheader(self):
+        """v10 does not have a changelog header chunk"""
+        return {}
+
+    def manifestheader(self):
+        """v10 does not have a manifest header chunk"""
+        return {}
+
+    def filelogheader(self):
+        """return the header of the filelogs chunk, v10 only has the filename"""
         l = self.chunklength()
-        return readexactly(self._stream, l)
+        if not l:
+            return {}
+        fname = readexactly(self._stream, l)
+        return dict(filename=fname)
 
     def _deltaheader(self, headertuple, prevnode):
         node, p1, p2, cs = headertuple
@@ -172,7 +183,7 @@
             deltabase = prevnode
         return node, p1, p2, deltabase, cs
 
-    def parsechunk(self, prevnode):
+    def deltachunk(self, prevnode):
         l = self.chunklength()
         if not l:
             return {}