Rev 4846: Fix crash involving static_tuple when C extensions are not built in http://bazaar.launchpad.net/~vila/bzr/integration

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Dec 1 08:58:07 GMT 2009


At http://bazaar.launchpad.net/~vila/bzr/integration

------------------------------------------------------------
revno: 4846 [merge]
revision-id: v.ladeuil+lp at free.fr-20091201085756-bsb0mwfr2gtxdb3e
parent: pqm at pqm.ubuntu.com-20091201053552-yws5hsfrricui8b6
parent: andrew.bennetts at canonical.com-20091201033525-lz3gnhoq4wj4e4kc
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: integration
timestamp: Tue 2009-12-01 09:57:56 +0100
message:
  Fix crash involving static_tuple when C extensions are not built
modified:
  bzrlib/groupcompress.py        groupcompress.py-20080705181503-ccbxd6xuy1bdnrpu-8
-------------- next part --------------
=== 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