~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
551
551
    def _refine_unique_nodes(self, unique_searcher, all_unique_searcher,
552
552
                             unique_tip_searchers, common_searcher):
553
553
        """Steps 5-8 of find_unique_ancestors.
554
 
        
 
554
 
555
555
        This function returns when common_searcher has stopped searching for
556
556
        more nodes.
557
557
        """
1198
1198
 
1199
1199
    def get_result(self):
1200
1200
        """Get a SearchResult for the current state of this searcher.
1201
 
        
 
1201
 
1202
1202
        :return: A SearchResult for this search so far. The SearchResult is
1203
1203
            static - the search can be advanced and the search result will not
1204
1204
            be invalidated or altered.
1208
1208
            # exclude keys for them. However, while we could have a second
1209
1209
            # look-ahead result buffer and shuffle things around, this method
1210
1210
            # is typically only called once per search - when memoising the
1211
 
            # results of the search. 
 
1211
            # results of the search.
1212
1212
            found, ghosts, next, parents = self._do_query(self._next_query)
1213
1213
            # pretend we didn't query: perhaps we should tweak _do_query to be
1214
1214
            # entirely stateless?
1255
1255
 
1256
1256
    def next_with_ghosts(self):
1257
1257
        """Return the next found ancestors, with ghosts split out.
1258
 
        
 
1258
 
1259
1259
        Ancestors are returned in the order they are seen in a breadth-first
1260
1260
        traversal.  No ancestor will be returned more than once. Ancestors are
1261
1261
        returned only after asking for their parents, which allows us to detect
1320
1320
 
1321
1321
    def find_seen_ancestors(self, revisions):
1322
1322
        """Find ancestors of these revisions that have already been seen.
1323
 
        
 
1323
 
1324
1324
        This function generally makes the assumption that querying for the
1325
1325
        parents of a node that has already been queried is reasonably cheap.
1326
1326
        (eg, not a round trip to a remote host).
1382
1382
                self._current_ghosts.intersection(revisions))
1383
1383
            self._current_present.difference_update(stopped)
1384
1384
            self._current_ghosts.difference_update(stopped)
1385
 
            # stopping 'x' should stop returning parents of 'x', but 
 
1385
            # stopping 'x' should stop returning parents of 'x', but
1386
1386
            # not if 'y' always references those same parents
1387
1387
            stop_rev_references = {}
1388
1388
            for rev in stopped_present:
1455
1455
 
1456
1456
    def get_recipe(self):
1457
1457
        """Return a recipe that can be used to replay this search.
1458
 
        
 
1458
 
1459
1459
        The recipe allows reconstruction of the same results at a later date
1460
1460
        without knowing all the found keys. The essential elements are a list
1461
1461
        of keys to start and and to stop at. In order to give reproducible