Rev 4846: (spiv) Fix crash involving static_tuple when C extensions are not in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Dec 1 09:41:16 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4846 [merge]
revision-id: pqm at pqm.ubuntu.com-20091201094108-g1zkahrmast6h08b
parent: pqm at pqm.ubuntu.com-20091201053552-yws5hsfrricui8b6
parent: v.ladeuil+lp at free.fr-20091201085756-bsb0mwfr2gtxdb3e
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-12-01 09:41:08 +0000
message:
  (spiv) Fix crash involving static_tuple when C extensions are not
  	built
modified:
  bzrlib/groupcompress.py        groupcompress.py-20080705181503-ccbxd6xuy1bdnrpu-8
=== modified file 'bzrlib/groupcompress.py'
--- a/bzrlib/groupcompress.py	2009-11-28 21:54:08 +0000
+++ b/bzrlib/groupcompress.py	2009-12-01 03:35:25 +0000
@@ -1747,8 +1747,13 @@
                 key = record.key
             self._unadded_refs[key] = record.parents
             yield found_sha1
-            keys_to_add.append((key, '%d %d' % (start_point, end_point),
-                (record.parents,)))
+            as_st = static_tuple.StaticTuple.from_sequence
+            if record.parents is not None:
+                parents = as_st([as_st(p) for p in record.parents])
+            else:
+                parents = None
+            refs = static_tuple.StaticTuple(parents)
+            keys_to_add.append((key, '%d %d' % (start_point, end_point), refs))
         if len(keys_to_add):
             flush()
         self._compressor = None




More information about the bazaar-commits mailing list