/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/smart/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from __future__ import absolute_import
20
20
 
21
 
from bzrlib import (
 
21
from .. import (
22
22
    bencode,
23
23
    errors,
24
24
    revision as _mod_revision,
25
25
    )
26
 
from bzrlib.controldir import ControlDir
27
 
from bzrlib.smart.request import (
 
26
from ..controldir import ControlDir
 
27
from .request import (
28
28
    FailedSmartServerResponse,
29
29
    SmartServerRequest,
30
30
    SuccessfulSmartServerResponse,
261
261
    def do_with_locked_branch(self, branch, *args):
262
262
        try:
263
263
            return self.do_tip_change_with_locked_branch(branch, *args)
264
 
        except errors.TipChangeRejected, e:
 
264
        except errors.TipChangeRejected as e:
265
265
            msg = e.msg
266
266
            if isinstance(msg, unicode):
267
267
                msg = msg.encode('utf-8')
360
360
    """Branch.set_last_revision_info.  Sets the revno and the revision ID of
361
361
    the specified branch.
362
362
 
363
 
    New in bzrlib 1.4.
 
363
    New in breezy 1.4.
364
364
    """
365
365
 
366
366
    def do_tip_change_with_locked_branch(self, branch, new_revno,
406
406
            return FailedSmartServerResponse(('TokenMismatch',))
407
407
        except errors.UnlockableTransport:
408
408
            return FailedSmartServerResponse(('UnlockableTransport',))
409
 
        except errors.LockFailed, e:
 
409
        except errors.LockFailed as e:
410
410
            return FailedSmartServerResponse(('LockFailed', str(e.lock), str(e.why)))
411
411
        if repo_token is None:
412
412
            repo_token = ''