~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-14 11:49:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6503.
  • Revision ID: jelmer@samba.org-20120314114929-5octiyxtut3skep6
Remove Branch.set_revision_history and Branch.revision_history.

Show diffs side-by-side

added added

removed removed

Lines of Context:
766
766
        """Print `file` to stdout."""
767
767
        raise NotImplementedError(self.print_file)
768
768
 
769
 
    @deprecated_method(deprecated_in((2, 4, 0)))
770
 
    def set_revision_history(self, rev_history):
771
 
        """See Branch.set_revision_history."""
772
 
        self._set_revision_history(rev_history)
773
 
 
774
769
    @needs_write_lock
775
770
    def _set_revision_history(self, rev_history):
776
771
        if len(rev_history) == 0:
1013
1008
        """
1014
1009
        raise NotImplementedError(self._gen_revision_history)
1015
1010
 
1016
 
    @deprecated_method(deprecated_in((2, 5, 0)))
1017
 
    @needs_read_lock
1018
 
    def revision_history(self):
1019
 
        """Return sequence of revision ids on this branch.
1020
 
 
1021
 
        This method will cache the revision history for as long as it is safe to
1022
 
        do so.
1023
 
        """
1024
 
        return self._revision_history()
1025
 
 
1026
1011
    def _revision_history(self):
1027
1012
        if 'evil' in debug.debug_flags:
1028
1013
            mutter_callsite(3, "revision_history scales with history.")
2778
2763
        else:
2779
2764
            return (0, _mod_revision.NULL_REVISION)
2780
2765
 
2781
 
    @deprecated_method(deprecated_in((2, 4, 0)))
2782
 
    @needs_write_lock
2783
 
    def set_revision_history(self, rev_history):
2784
 
        """See Branch.set_revision_history."""
2785
 
        self._set_revision_history(rev_history)
2786
 
 
2787
2766
    def _set_revision_history(self, rev_history):
2788
2767
        if 'evil' in debug.debug_flags:
2789
2768
            mutter_callsite(3, "set_revision_history scales with history.")