~treaves/trac-bzr/trac-bzr

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: Timothy Reaves
  • Date: 2014-02-13 23:45:40 UTC
  • Revision ID: treaves@silverfieldstech.com-20140213234540-1hsps1e5vrcczyef
Refactor code to no longer used a method removed in bzr 2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
667
667
        branch, revid = self._parse_rev(rev)
668
668
        if revid in (NULL_REVISION, CURRENT_REVISION) or branch is None:
669
669
            return None
670
 
        ancestry = iter(branch.repository.iter_reverse_revision_history(revid))
 
670
        ancestry = iter(branch.repository.get_graph().iter_lefthand_ancestry(revid))
671
671
        ancestry.next()
672
672
        try:
673
673
            return self.string_rev(branch, ancestry.next())
920
920
            bpath = self.bzr_repo.branch_path(self.branch)
921
921
            if self.path == '' or bpath.startswith(self.path + '/'):
922
922
                repo = self.branch.repository
923
 
                ancestry = repo.iter_reverse_revision_history(self.revid)
 
923
                ancestry = repo.get_graph().iter_lefthand_ancestry(self.revid)
924
924
                ancestry = iter(ancestry)
925
925
                for rev_id in ancestry:
926
926
                    yield (self.path,
1043
1043
 
1044
1044
        # Aways use a linear view of our ancestry.
1045
1045
        repo = self.branch.repository
1046
 
        ancestry = repo.iter_reverse_revision_history(current_revid)
 
1046
        ancestry = repo.get_graph().iter_lefthand_ancestry(current_revid)
1047
1047
        ancestry = iter(ancestry)
1048
1048
        # ancestry now iterates from current_revid down to revno 1
1049
1049