~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-08 13:46:49 UTC
  • mto: This revision was merged to the branch mainline in revision 5842.
  • Revision ID: jelmer@samba.org-20110508134649-26xas3otdjlw9jpa
Translate local set_rh calls to remote set_rh calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
 
233
233
    def do_tip_change_with_locked_branch(self, branch, new_last_revision_id):
234
234
        if new_last_revision_id == 'null:':
235
 
            branch.set_last_revision_info(0, 'null:')
 
235
            branch._set_revision_history([])
236
236
        else:
237
237
            if not branch.repository.has_revision(new_last_revision_id):
238
238
                return FailedSmartServerResponse(
239
239
                    ('NoSuchRevision', new_last_revision_id))
240
 
            branch.generate_revision_history(new_last_revision_id)
 
240
            branch._set_revision_history(branch._lefthand_history(
 
241
                new_last_revision_id, None, None))
241
242
        return SuccessfulSmartServerResponse(('ok',))
242
243
 
243
244