~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-17 23:06:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5803.
  • Revision ID: jelmer@samba.org-20110417230622-e52xsel9m0t0umcf
Add a RevisionTree.get_file_revision() method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2919
2919
            raise errors.UnexpectedSmartServerResponse(response)
2920
2920
        self._run_post_change_branch_tip_hooks(old_revno, old_revid)
2921
2921
 
2922
 
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
2923
2922
    @needs_write_lock
2924
2923
    def set_revision_history(self, rev_history):
2925
 
        """See Branch.set_revision_history."""
2926
 
        self._set_revision_history(rev_history)
2927
 
 
2928
 
    @needs_write_lock
2929
 
    def _set_revision_history(self, rev_history):
2930
2924
        # Send just the tip revision of the history; the server will generate
2931
2925
        # the full history from that.  If the revision doesn't exist in this
2932
2926
        # branch, NoSuchRevision will be raised.
3009
3003
        # XXX: These should be returned by the set_last_revision_info verb
3010
3004
        old_revno, old_revid = self.last_revision_info()
3011
3005
        self._run_pre_change_branch_tip_hooks(revno, revision_id)
3012
 
        if not revision_id or not isinstance(revision_id, basestring):
3013
 
            raise errors.InvalidRevisionId(revision_id=revision_id, branch=self)
 
3006
        revision_id = _mod_revision.ensure_null(revision_id)
3014
3007
        try:
3015
3008
            response = self._call('Branch.set_last_revision_info',
3016
3009
                self._remote_path(), self._lock_token, self._repo_lock_token,
3045
3038
            except errors.UnknownSmartMethod:
3046
3039
                medium._remember_remote_is_before((1, 6))
3047
3040
        self._clear_cached_state_of_remote_branch_only()
3048
 
        self._set_revision_history(self._lefthand_history(revision_id,
 
3041
        self.set_revision_history(self._lefthand_history(revision_id,
3049
3042
            last_rev=last_rev,other_branch=other_branch))
3050
3043
 
3051
3044
    def set_push_location(self, location):