~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/groupcompress.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-05 02:46:38 UTC
  • mfrom: (4398.5.20 bencode_serializer)
  • Revision ID: pqm@pqm.ubuntu.com-20090605024638-fe5tn388osc38jvw
(bialix, jelmer, jam) Pyrex bencode and --development7-rich-root

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
                raise ValueError('invalid content_len %d for record @ pos %d'
325
325
                                 % (content_len, pos - len_len - 1))
326
326
            if kind == 'f': # Fulltext
327
 
                result.append(('f', content_len))
 
327
                if include_text:
 
328
                    text = self._content[pos:pos+content_len]
 
329
                    result.append(('f', content_len, text))
 
330
                else:
 
331
                    result.append(('f', content_len))
328
332
            elif kind == 'd': # Delta
329
333
                delta_content = self._content[pos:pos+content_len]
330
334
                delta_info = []
339
343
                        (offset, length,
340
344
                         delta_pos) = decode_copy_instruction(delta_content, c,
341
345
                                                              delta_pos)
342
 
                        delta_info.append(('c', offset, length))
 
346
                        if include_text:
 
347
                            text = self._content[offset:offset+length]
 
348
                            delta_info.append(('c', offset, length, text))
 
349
                        else:
 
350
                            delta_info.append(('c', offset, length))
343
351
                        measured_len += length
344
352
                    else: # Insert
345
353
                        if include_text: