Rev 3880: Get the > sign the right way around. in http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack3
John Arbash Meinel
john at arbash-meinel.com
Thu Mar 19 23:30:07 GMT 2009
At http://bzr.arbash-meinel.com/branches/bzr/brisbane/hack3
------------------------------------------------------------
revno: 3880
revision-id: john at arbash-meinel.com-20090319232956-gwkog4jygz9h0l8u
parent: john at arbash-meinel.com-20090319225110-hfslu08ridcsc5xi
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hack3
timestamp: Thu 2009-03-19 18:29:56 -0500
message:
Get the > sign the right way around.
We want to expand hmask if it is too small, not shrink it if it
is too big.
-------------- next part --------------
=== modified file 'bzrlib/diff-delta.c'
--- a/bzrlib/diff-delta.c 2009-03-19 14:51:32 +0000
+++ b/bzrlib/diff-delta.c 2009-03-19 23:29:56 +0000
@@ -393,7 +393,7 @@
for (i = 4; (1u << i) < hsize && i < 31; i++);
hsize = 1 << i;
hmask = hsize - 1;
- if (old && old->hash_mask < hmask) {
+ if (old && old->hash_mask > hmask) {
hmask = old->hash_mask;
hsize = hmask + 1;
}
@@ -447,6 +447,7 @@
free(hash_count);
if (old) {
old->last_src = src;
+ assert(old->hash_mask <= hmask);
}
index = pack_delta_index(hash, hsize, total_num_entries, old);
free(hash);
More information about the bazaar-commits
mailing list