~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

(jelmer) Deprecate Repository.iter_reverse_revision_history(). (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1002
1002
            raise AssertionError('_iter_for_revno returned too much history')
1003
1003
        return (True, partial_history[-1])
1004
1004
 
 
1005
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
1005
1006
    def iter_reverse_revision_history(self, revision_id):
1006
1007
        """Iterate backwards through revision ids in the lefthand history
1007
1008
 
1833
1834
        it is encountered, history extension will stop.
1834
1835
    """
1835
1836
    start_revision = partial_history_cache[-1]
1836
 
    iterator = repo.iter_reverse_revision_history(start_revision)
 
1837
    graph = repo.get_graph()
 
1838
    iterator = graph.iter_lefthand_ancestry(start_revision,
 
1839
        (_mod_revision.NULL_REVISION,))
1837
1840
    try:
1838
 
        #skip the last revision in the list
 
1841
        # skip the last revision in the list
1839
1842
        iterator.next()
1840
1843
        while True:
1841
1844
            if (stop_index is not None and