~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-12-01 09:41:08 UTC
  • mfrom: (4845.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20091201094108-g1zkahrmast6h08b
(spiv) Fix crash involving static_tuple when C extensions are not
        built

Show diffs side-by-side

added added

removed removed

Lines of Context:
1747
1747
                key = record.key
1748
1748
            self._unadded_refs[key] = record.parents
1749
1749
            yield found_sha1
1750
 
            keys_to_add.append((key, '%d %d' % (start_point, end_point),
1751
 
                (record.parents,)))
 
1750
            as_st = static_tuple.StaticTuple.from_sequence
 
1751
            if record.parents is not None:
 
1752
                parents = as_st([as_st(p) for p in record.parents])
 
1753
            else:
 
1754
                parents = None
 
1755
            refs = static_tuple.StaticTuple(parents)
 
1756
            keys_to_add.append((key, '%d %d' % (start_point, end_point), refs))
1752
1757
        if len(keys_to_add):
1753
1758
            flush()
1754
1759
        self._compressor = None