~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-16 01:09:56 UTC
  • mfrom: (5784.1.4 760435-less-fail)
  • Revision ID: pqm@pqm.ubuntu.com-20110416010956-5wrpm136qq2hz5f3
(mbp) rename and deprecate failUnlessExists and failIfExists (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1481
1481
 
1482
1482
    def get_commit_builder(self, branch, parents, config, timestamp=None,
1483
1483
                           timezone=None, committer=None, revprops=None,
1484
 
                           revision_id=None, lossy=False):
 
1484
                           revision_id=None):
1485
1485
        # FIXME: It ought to be possible to call this without immediately
1486
1486
        # triggering _ensure_real.  For now it's the easiest thing to do.
1487
1487
        self._ensure_real()
1488
1488
        real_repo = self._real_repository
1489
1489
        builder = real_repo.get_commit_builder(branch, parents,
1490
1490
                config, timestamp=timestamp, timezone=timezone,
1491
 
                committer=committer, revprops=revprops,
1492
 
                revision_id=revision_id, lossy=lossy)
 
1491
                committer=committer, revprops=revprops, revision_id=revision_id)
1493
1492
        return builder
1494
1493
 
1495
1494
    def add_fallback_repository(self, repository):
2919
2918
            raise errors.UnexpectedSmartServerResponse(response)
2920
2919
        self._run_post_change_branch_tip_hooks(old_revno, old_revid)
2921
2920
 
2922
 
    @symbol_versioning.deprecated_method(symbol_versioning.deprecated_in((2, 4, 0)))
2923
2921
    @needs_write_lock
2924
2922
    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
2923
        # Send just the tip revision of the history; the server will generate
2931
2924
        # the full history from that.  If the revision doesn't exist in this
2932
2925
        # branch, NoSuchRevision will be raised.
3009
3002
        # XXX: These should be returned by the set_last_revision_info verb
3010
3003
        old_revno, old_revid = self.last_revision_info()
3011
3004
        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)
 
3005
        revision_id = _mod_revision.ensure_null(revision_id)
3014
3006
        try:
3015
3007
            response = self._call('Branch.set_last_revision_info',
3016
3008
                self._remote_path(), self._lock_token, self._repo_lock_token,
3045
3037
            except errors.UnknownSmartMethod:
3046
3038
                medium._remember_remote_is_before((1, 6))
3047
3039
        self._clear_cached_state_of_remote_branch_only()
3048
 
        self._set_revision_history(self._lefthand_history(revision_id,
 
3040
        self.set_revision_history(self._lefthand_history(revision_id,
3049
3041
            last_rev=last_rev,other_branch=other_branch))
3050
3042
 
3051
3043
    def set_push_location(self, location):