~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

Add tests for starting and stopping searches in combination with get_recipe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
        self._stopped_keys = set()
514
514
        self._parents_provider = parents_provider
515
515
        self._returning = 'next_with_ghosts'
 
516
        self._current_present = set()
 
517
        self._current_ghosts = set()
 
518
        self._current_parents = {}
516
519
 
517
520
    def __repr__(self):
518
521
        if self._iterations:
677
680
                if refs == 0:
678
681
                    stop_parents.add(rev_id)
679
682
            self._next_query.difference_update(stop_parents)
 
683
        self._stopped_keys.update(stopped)
680
684
        return stopped
681
685
 
682
686
    def start_searching(self, revisions):
688
692
        ghost/not ghost status of revisions. (A tuple (present, ghosted)).
689
693
        """
690
694
        revisions = frozenset(revisions)
 
695
        self._started_keys.update(revisions)
691
696
        if self._returning == 'next':
692
697
            self._next_query.update(revisions.difference(self.seen))
693
698
            self.seen.update(revisions)