~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Server-side branch related request implmentations."""
18
18
 
 
19
from __future__ import absolute_import
19
20
 
20
21
from bzrlib import (
21
22
    bencode,
298
299
 
299
300
    def do_tip_change_with_locked_branch(self, branch, new_last_revision_id):
300
301
        if new_last_revision_id == 'null:':
301
 
            branch._set_revision_history([])
 
302
            branch.set_last_revision_info(0, new_last_revision_id)
302
303
        else:
303
304
            if not branch.repository.has_revision(new_last_revision_id):
304
305
                return FailedSmartServerResponse(
305
306
                    ('NoSuchRevision', new_last_revision_id))
306
 
            branch._set_revision_history(branch._lefthand_history(
307
 
                new_last_revision_id, None, None))
 
307
            branch.generate_revision_history(new_last_revision_id, None, None)
308
308
        return SuccessfulSmartServerResponse(('ok',))
309
309
 
310
310