~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-30 23:53:42 UTC
  • mfrom: (3808.1.4 stop_searching)
  • Revision ID: pqm@pqm.ubuntu.com-20081030235342-3ttqulydt0irv350
Improve behaviour of stop_searching_any. Fixes regression in
        _walk_to_common_revisions that causes unnecessary data to be
        fetched. (Andrew Bennetts, John Arbash Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1331
1331
        Remove any of the specified revisions from the search list.
1332
1332
 
1333
1333
        None of the specified revisions are required to be present in the
1334
 
        search list.  In this case, the call is a no-op.
 
1334
        search list.
 
1335
 
 
1336
        It is okay to call stop_searching_any() for revisions which were seen
 
1337
        in previous iterations. It is the callers responsibility to call
 
1338
        find_seen_ancestors() to make sure that current search tips that are
 
1339
        ancestors of those revisions are also stopped.  All explicitly stopped
 
1340
        revisions will be excluded from the search result's get_keys(), though.
1335
1341
        """
1336
1342
        # TODO: does this help performance?
1337
1343
        # if not revisions:
1368
1374
                    stop_parents.add(rev_id)
1369
1375
            self._next_query.difference_update(stop_parents)
1370
1376
        self._stopped_keys.update(stopped)
 
1377
        self._stopped_keys.update(revisions - set([revision.NULL_REVISION]))
1371
1378
        return stopped
1372
1379
 
1373
1380
    def start_searching(self, revisions):