Rev 3714: Small cleanups from Robert in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/autopack_bug_242510
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 26 21:28:29 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/autopack_bug_242510
------------------------------------------------------------
revno: 3714
revision-id: john at arbash-meinel.com-20080926202824-934bshs1o0evsec4
parent: john at arbash-meinel.com-20080919154746-g07uetnih1s5flil
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: autopack_bug_242510
timestamp: Fri 2008-09-26 15:28:24 -0500
message:
Small cleanups from Robert
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2008-09-19 15:03:55 +0000
+++ b/NEWS 2008-09-26 20:28:24 +0000
@@ -32,9 +32,10 @@
* Make the first line of the manpage preamble a comment again.
(David Futcher, #242106)
- * The autopacking logic will now avoid creating a new pack with
- identical contents to an existing pack.
- (John Arbash Meinel, #242510)
+ * The autopacking logic will now always create a single new pack from
+ all of the content which it deems is worth moving. This avoids the
+ 'repack a single pack' bug and should result in better packing
+ overall. (John Arbash Meinel, #242510, #172644)
DOCUMENTATION:
=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py 2008-09-19 15:47:46 +0000
+++ b/bzrlib/repofmt/pack_repo.py 2008-09-26 20:28:24 +0000
@@ -1300,11 +1300,8 @@
# this pack is used up, shift left.
del pack_distribution[0]
pack_operations.append([0, []])
- # At this point, we have a bunch of pack files that we are recombining.
- # This triggers a certain amount of I/O. However, we can just shove all
- # of these modifications into a single larger pack. That triggers the
- # same amount of I/O, but leaves us with fewer packs in the general
- # case.
+ # Now that we know which pack files we want to move, shove them all
+ # into a single pack file.
final_rev_count = 0
final_pack_list = []
for num_revs, pack_files in pack_operations:
@@ -1312,8 +1309,7 @@
final_pack_list.extend(pack_files)
if len(final_pack_list) == 1:
raise AssertionError('We somehow generated an autopack with a'
- ' single pack file being moved.'
- ' I couldnt find a way to do this')
+ ' single pack file being moved.')
return []
return [[final_rev_count, final_pack_list]]
More information about the bazaar-commits
mailing list