[MERGE] Redo annotate more simply, using just the public interfaces for VersionedFiles.
Martin Pool
mbp at canonical.com
Wed Jul 2 05:14:19 BST 2008
Martin Pool has voted tweak.
Status is now: Conditionally approved
Comment:
So this is certainly simpler, which was nice.
From your previous conversation with John it was not clear to me whether
this would be slower or not:
>> It will be slower primarily because we can't use the cached matching
>> blocks. So we have to re-diff every file.
>
>There is self._extract_matching_blocks. Oh, the optimiser is missing
>there on knits - I'll do a patch to reinstate that today. But bundle
>generation uses that for make_mpdiffs and is still totally generic.
It looks like it might be. Maybe we should measure this on a regular
pack repository and if necessary special-case it for non-stacked
repositories?
+ graph = Graph(self._knit)
+ head_cache = _mod_graph.FrozenHeadsCache(graph)
+ search = graph._make_breadth_first_searcher([key])
+ keys = set()
+ while True:
+ try:
+ present, ghosts = search.next_with_ghosts()
+ except StopIteration:
+ break
+ keys.update(present)
+ parent_map = self._knit.get_parent_map(keys)
This smells like it should be a separate named method, maybe on the
knit?
Aside from that if you think the performance tradeoff is reasonable it's
ok with me.
--
Martin
For details, see:
http://bundlebuggy.aaronbentley.com/request/%3C1214377566.1536.67.camel%40lifeless-64%3E
More information about the bazaar
mailing list