~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

(spiv) Fetch tagged revisions (not just tags) during branch,
 merge and pull. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1576
1576
 
1577
1577
class AbstractSearch(object):
1578
1578
 
1579
 
    def get_search_result(self):
 
1579
    def execute(self):
1580
1580
        """Construct a network-ready search result from this search description.
1581
1581
 
1582
1582
        This may take some time to search repositories, etc.
1583
1583
 
1584
 
        :return: A search result.
 
1584
        :return: A search result (an object that implements
 
1585
            AbstractSearchResult's API).
1585
1586
        """
1586
 
        raise NotImplementedError(self.get_search_result)
 
1587
        raise NotImplementedError(self.execute)
1587
1588
 
1588
1589
 
1589
1590
class SearchResult(AbstractSearchResult):
1705
1706
 
1706
1707
    def __repr__(self):
1707
1708
        if len(self.heads) > 5:
1708
 
            heads_repr = repr(list(self.heads)[:5] + ', ...]')
 
1709
            heads_repr = repr(list(self.heads)[:5])[:-1]
 
1710
            heads_repr += ', <%d more>...]' % (len(self.heads) - 5,)
1709
1711
        else:
1710
1712
            heads_repr = repr(self.heads)
1711
1713
        return '<%s heads:%s repo:%r>' % (
1813
1815
        self.from_repo = from_repo
1814
1816
        self.find_ghosts = find_ghosts
1815
1817
 
1816
 
    def get_search_result(self):
 
1818
    def execute(self):
1817
1819
        return self.to_repo.search_missing_revision_ids(
1818
1820
            self.from_repo, find_ghosts=self.find_ghosts)
1819
1821
 
1853
1855
            self.__class__.__name__, self.from_repo, self.to_repo,
1854
1856
            self.find_ghosts, reqd_revs_repr, ifp_revs_repr)
1855
1857
 
1856
 
    def get_search_result(self):
 
1858
    def execute(self):
1857
1859
        return self.to_repo.search_missing_revision_ids(
1858
1860
            self.from_repo, revision_ids=self.required_ids,
1859
1861
            if_present_ids=self.if_present_ids, find_ghosts=self.find_ghosts)