/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Robert Collins
  • Date: 2008-01-16 00:53:06 UTC
  • mto: (3184.3.1 use-SearchResult)
  • mto: This revision was merged to the branch mainline in revision 3192.
  • Revision ID: robertc@robertcollins.net-20080116005306-4o2tny789tuo60gb
Record the number of found revisions for cross checking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
536
536
        added to the exclude list (or else ghost filling may alter the
537
537
        results).
538
538
 
539
 
        :return: A tuple (start_keys_set, exclude_keys_set). To recreate the
540
 
            results of this search, create a breadth first searcher on the same
541
 
            graph starting at start_keys. Then call next() (or
542
 
            next_with_ghosts()) repeatedly, and on every result, call
543
 
            stop_searching_any on any keys from the exclude_keys set.
 
539
        :return: A tuple (start_keys_set, exclude_keys_set, revision_count). To
 
540
            recreate the results of this search, create a breadth first
 
541
            searcher on the same graph starting at start_keys. Then call next()
 
542
            (or next_with_ghosts()) repeatedly, and on every result, call
 
543
            stop_searching_any on any keys from the exclude_keys set. The
 
544
            revision_count value acts as a trivial cross-check - the found
 
545
            revisions of the new search should have as many elements as
 
546
            revision_count. If it does not, then additional revisions have been
 
547
            ghosted since the search was executed the first time and the second
 
548
            time.
544
549
        """
545
550
        if self._returning == 'next':
546
551
            # We have to know the current nodes children to be able to list the
555
560
            next_query = next.union(ghosts)
556
561
        else:
557
562
            next_query = self._next_query
558
 
        return self._started_keys, self._stopped_keys.union(next_query)
 
563
        excludes = self._stopped_keys.union(next_query)
 
564
        return (self._started_keys, excludes,
 
565
            len(self.seen.difference(excludes)))
559
566
 
560
567
    def next(self):
561
568
        """Return the next ancestors of this revision.