~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-14 14:17:48 UTC
  • mto: This revision was merged to the branch mainline in revision 6503.
  • Revision ID: jelmer@samba.org-20120314141748-7uoagltnjs7etowl
Fix some more tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3929
3929
            except errors.UnknownSmartMethod:
3930
3930
                medium._remember_remote_is_before((1, 6))
3931
3931
        self._clear_cached_state_of_remote_branch_only()
3932
 
        self._set_revision_history(self._lefthand_history(revision_id,
3933
 
            last_rev=last_rev,other_branch=other_branch))
 
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)
3934
3944
 
3935
3945
    def set_push_location(self, location):
3936
3946
        self._set_config_location('push_location', location)