equal
deleted
inserted
replaced
161 raise util.Abort(_("premature EOF reading chunk" |
161 raise util.Abort(_("premature EOF reading chunk" |
162 " (got %d bytes, expected %d)") |
162 " (got %d bytes, expected %d)") |
163 % (len(d), l)) |
163 % (len(d), l)) |
164 return d |
164 return d |
165 |
165 |
|
166 def parsechunk(self): |
|
167 l = self.chunklength() |
|
168 if not l: |
|
169 return {} |
|
170 h = self.read(80) |
|
171 node, p1, p2, cs = struct.unpack("20s20s20s20s", h) |
|
172 data = self.read(l - 80) |
|
173 return dict(node=node, p1=p1, p2=p2, cs=cs, data=data) |
|
174 |
166 class headerlessfixup(object): |
175 class headerlessfixup(object): |
167 def __init__(self, fh, h): |
176 def __init__(self, fh, h): |
168 self._h = h |
177 self._h = h |
169 self._fh = fh |
178 self._fh = fh |
170 def read(self, n): |
179 def read(self, n): |