~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Martin Packman
  • Date: 2011-11-29 16:14:12 UTC
  • mto: This revision was merged to the branch mainline in revision 6327.
  • Revision ID: martin.packman@canonical.com-20111129161412-mx4yu5mg6xsaty46
Require the dulwich package when using py2exe with the git plugin enabled

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
20
19
 
21
20
from bzrlib import (
22
21
    bencode,
299
298
 
300
299
    def do_tip_change_with_locked_branch(self, branch, new_last_revision_id):
301
300
        if new_last_revision_id == 'null:':
302
 
            branch.set_last_revision_info(0, new_last_revision_id)
 
301
            branch._set_revision_history([])
303
302
        else:
304
303
            if not branch.repository.has_revision(new_last_revision_id):
305
304
                return FailedSmartServerResponse(
306
305
                    ('NoSuchRevision', new_last_revision_id))
307
 
            branch.generate_revision_history(new_last_revision_id, None, None)
 
306
            branch._set_revision_history(branch._lefthand_history(
 
307
                new_last_revision_id, None, None))
308
308
        return SuccessfulSmartServerResponse(('ok',))
309
309
 
310
310