historycache sets _merge_sorted_revisions_cache on a branch to a single-use iterator

Bug #365806 reported by Michael Hudson-Doyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar History Cache
Fix Released
Undecided
Ian Clatworthy

Bug Description

I don't really know what the intent of the code is, but this code:

        if br._merge_sorted_revisions_cache is None:
            stored_data = cache.iter()
            if stored_data is not None:
                mutter("loaded history cache from %s" % cache.file_name())
                br._merge_sorted_revisions_cache = stored_data

appears to set br._merge_sorted_revisions_cache to an object of type 'listiter' -- which cannot possible go well, as by the time it gets accessed again, the iterator has been exhausted.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Fixed in rev 24.

Changed in bzr-historycache:
assignee: nobody → Ian Clatworthy (ian-clatworthy)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.