Rev 85: * When a 0 revision pack is added and the existing repo is empty, do not in http://people.canonical.com/~robertc/baz2.0/plugins/search/trunk
Robert Collins
robertc at robertcollins.net
Tue Feb 1 04:47:56 UTC 2011
At http://people.canonical.com/~robertc/baz2.0/plugins/search/trunk
------------------------------------------------------------
revno: 85 [merge]
revision-id: robertc at robertcollins.net-20110201044744-vvozddwys1vmo2zl
parent: robertc at robertcollins.net-20110113212010-95wdqtt69twh3bff
parent: mbp at canonical.com-20110201042025-hbv2qcngoc6fqevz
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Tue 2011-02-01 17:47:44 +1300
message:
* When a 0 revision pack is added and the existing repo is empty, do not
crash. This is probably a stacked branch situation but we don't actually
know how to reproduce. (Martin Pool, #627202)
modified:
NEWS news-20080608052041-z5bahsl8kwl0uf4x-2
index.py index.py-20080608055509-hnimeek7q8tctkqf-2
=== modified file 'NEWS'
--- a/NEWS 2010-05-14 15:04:47 +0000
+++ b/NEWS 2011-02-01 04:47:44 +0000
@@ -54,6 +54,10 @@
* Does not break when bzr-svn is present and incompatible with bzr.
(Gary van der Merwe)
+ * When a 0 revision pack is added and the existing repo is empty, do not
+ crash. This is probably a stacked branch situation but we don't actually
+ know how to reproduce. (Martin Pool, #627202)
+
* Works on bzr 2.2 (temporarily broken due to CombinedGraphIndex API
changes) (Robert Collins).
=== modified file 'index.py'
--- a/index.py 2010-12-14 14:02:13 +0000
+++ b/index.py 2011-02-01 04:20:25 +0000
@@ -442,7 +442,7 @@
if not allow_pack:
return
total_revisions = self._revision_index.key_count()
- max_components = int(math.ceil(math.log(total_revisions, 2)))
+ max_components = int(math.ceil(math.log(max(1, total_revisions), 2)))
if max_components < 1:
max_components = 1
excess = len(self._current_names) - max_components
More information about the bazaar-commits
mailing list