~jteh/trac-bzr/newDeps

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: James Teh
  • Date: 2013-04-08 01:38:44 UTC
  • Revision ID: jamie@jantrid.net-20130408013844-10m1fwa4eotq306w
Repository.iter_reverse_revision_history() was removed from bzr. Update code accordingly.

Show diffs side-by-side

added added

removed removed

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