/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: Andrew Bennetts
  • Date: 2009-03-04 07:10:07 UTC
  • mto: (4086.1.2 hpss-integration)
  • mto: This revision was merged to the branch mainline in revision 4087.
  • Revision ID: andrew.bennetts@canonical.com-20090304071007-8iqoi1m44ypmzg2a
Rough prototype of allowing a SearchResult to be passed to fetch, and using that to improve network conversations.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1495
1495
        return self._keys
1496
1496
 
1497
1497
 
 
1498
class MiniSearchResult(object):
 
1499
 
 
1500
    def __init__(self, start_key, repo):
 
1501
        self.start_key = start_key
 
1502
        self.repo = repo
 
1503
 
 
1504
    def get_keys(self):
 
1505
        # XXX
 
1506
        keys = [key for (key, parents) in
 
1507
                self.repo.get_graph().iter_ancestry(self.start_key)]
 
1508
        if keys[-1] != 'null:':
 
1509
            raise AssertionError(
 
1510
                "Ancestry ends with %r, not null." % (keys[-1],))
 
1511
        del keys[-1]
 
1512
        return keys
 
1513
 
 
1514
 
1498
1515
def collapse_linear_regions(parent_map):
1499
1516
    """Collapse regions of the graph that are 'linear'.
1500
1517