Rev 60: Fix bug #336373 by adding local keys to locations after the fact, rather than before. in http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/trunk
John Arbash Meinel
john at arbash-meinel.com
Mon Mar 2 20:09:00 GMT 2009
At http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/trunk
------------------------------------------------------------
revno: 60
revision-id: john at arbash-meinel.com-20090302200837-l2v96rd0e6u68479
parent: ian.clatworthy at canonical.com-20090302071130-xhzzdeff3of2tdjl
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk
timestamp: Mon 2009-03-02 14:08:37 -0600
message:
Fix bug #336373 by adding local keys to locations after the fact, rather than before.
-------------- next part --------------
=== modified file 'groupcompress.py'
--- a/groupcompress.py 2009-03-02 06:35:43 +0000
+++ b/groupcompress.py 2009-03-02 20:08:37 +0000
@@ -593,7 +593,6 @@
# Cheap: iterate
locations = self._index.get_build_details(keys)
local_keys = frozenset(keys).intersection(set(self._unadded_refs))
- locations.update((key, None) for key in local_keys)
if ordering == 'topological':
# would be better to not globally sort initially but instead
# start with one key, recurse to its oldest parent, then grab
@@ -614,7 +613,8 @@
# somehow grouping based on locations[key][0:3]
present_keys = sort_gc_optimal(parent_map)
elif ordering == 'as-requested':
- present_keys = [key for key in orig_keys if key in locations]
+ present_keys = [key for key in orig_keys if key in locations
+ or key in local_keys]
else:
# We want to yield the keys in a semi-optimal (read-wise) ordering.
# Otherwise we thrash the _group_cache and destroy performance
@@ -626,6 +626,7 @@
# We don't have an ordering for keys in the in-memory object, but
# lets process the in-memory ones first.
present_keys = list(local_keys) + present_keys
+ locations.update((key, None) for key in local_keys)
absent_keys = keys.difference(set(locations))
for key in absent_keys:
yield AbsentContentFactory(key)
More information about the bazaar-commits
mailing list