/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/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-27 11:34:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20110927113438-iaunzmkn9yscv0al
More test fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1013
1013
        """
1014
1014
        return self._revision_history()
1015
1015
 
1016
 
    def iter_revision_history(self):
 
1016
    def iter_reverse_revision_history(self):
1017
1017
        """Iterate over the revision ids in this branch, last to first.
1018
1018
        """
1019
1019
        self.lock_read()
1020
1020
        try:
1021
 
            for revid in self._revision_history():
1022
 
                yield revid
 
1021
            revid = self.last_revision()
 
1022
            for revid in self._partial_revision_history_cache:
 
1023
                yield revid
 
1024
            graph = self.repository.get_graph()
 
1025
            for revid in graph.iter_lefthand_ancestry(revid):
 
1026
                self._partial_revision_history_cache.append(revid)
 
1027
                if revid == _mod_revision.NULL_REVISION:
 
1028
                    return
 
1029
                yield revid
 
1030
            else:
 
1031
                raise errors.GhostRevisionUnusableHere(revid)
1023
1032
        finally:
1024
1033
            self.unlock()
1025
1034
 
2780
2789
            history.pop()
2781
2790
        return history
2782
2791
 
 
2792
    def iter_reverse_revision_history(self):
 
2793
        """Iterate over the revision ids in this branch, last to first.
 
2794
        """
 
2795
        self.lock_read()
 
2796
        try:
 
2797
            for revid in reversed(self._revision_history()):
 
2798
                yield revid
 
2799
        finally:
 
2800
            self.unlock()
 
2801
 
2783
2802
    def _synchronize_history(self, destination, revision_id):
2784
2803
        if not isinstance(destination, FullHistoryBzrBranch):
2785
2804
            super(BzrBranch, self)._synchronize_history(