~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-09 11:01:58 UTC
  • mto: This revision was merged to the branch mainline in revision 6489.
  • Revision ID: v.ladeuil+lp@free.fr-20120309110158-62om0ttqa0ooeuw5
Fix the forgotten reference to what's new as part of the 2.6 series initialization.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3792
3792
            raise errors.UnexpectedSmartServerResponse(response)
3793
3793
        self._run_post_change_branch_tip_hooks(old_revno, old_revid)
3794
3794
 
 
3795
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
 
3796
    @needs_write_lock
 
3797
    def set_revision_history(self, rev_history):
 
3798
        """See Branch.set_revision_history."""
 
3799
        self._set_revision_history(rev_history)
 
3800
 
 
3801
    @needs_write_lock
 
3802
    def _set_revision_history(self, rev_history):
 
3803
        # Send just the tip revision of the history; the server will generate
 
3804
        # the full history from that.  If the revision doesn't exist in this
 
3805
        # branch, NoSuchRevision will be raised.
 
3806
        if rev_history == []:
 
3807
            rev_id = 'null:'
 
3808
        else:
 
3809
            rev_id = rev_history[-1]
 
3810
        self._set_last_revision(rev_id)
 
3811
        for hook in branch.Branch.hooks['set_rh']:
 
3812
            hook(self, rev_history)
 
3813
        self._cache_revision_history(rev_history)
 
3814
 
3795
3815
    def _get_parent_location(self):
3796
3816
        medium = self._client._medium
3797
3817
        if medium._is_remote_before((1, 13)):
3929
3949
            except errors.UnknownSmartMethod:
3930
3950
                medium._remember_remote_is_before((1, 6))
3931
3951
        self._clear_cached_state_of_remote_branch_only()
3932
 
        graph = self.repository.get_graph()
3933
 
        (last_revno, last_revid) = self.last_revision_info()
3934
 
        known_revision_ids = [
3935
 
            (last_revid, last_revno),
3936
 
            (_mod_revision.NULL_REVISION, 0),
3937
 
            ]
3938
 
        if last_rev is not None:
3939
 
            if not graph.is_ancestor(last_rev, revision_id):
3940
 
                # our previous tip is not merged into stop_revision
3941
 
                raise errors.DivergedBranches(self, other_branch)
3942
 
        revno = graph.find_distance_to_null(revision_id, known_revision_ids)
3943
 
        self.set_last_revision_info(revno, revision_id)
 
3952
        self._set_revision_history(self._lefthand_history(revision_id,
 
3953
            last_rev=last_rev,other_branch=other_branch))
3944
3954
 
3945
3955
    def set_push_location(self, location):
3946
3956
        self._set_config_location('push_location', location)