/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/switch.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-23 01:17:33 UTC
  • mfrom: (7516.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200623011733-ohfy5ukvyehd2kpf
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/386223

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        if tree is not None:
66
66
            parent_ids = tree.get_parent_ids()
67
67
            if len(parent_ids) > 1:
68
 
                raise errors.BzrCommandError(
 
68
                raise errors.CommandError(
69
69
                    gettext('Pending merges must be '
70
70
                            'committed or reverted before using switch.'))
71
71
 
137
137
            possible_transports = []
138
138
            try:
139
139
                if not force and _any_local_commits(b, possible_transports):
140
 
                    raise errors.BzrCommandError(gettext(
 
140
                    raise errors.CommandError(gettext(
141
141
                        'Cannot switch as local commits found in the checkout. '
142
142
                        'Commit these to the bound branch or use --force to '
143
143
                        'throw them away.'))
144
144
            except errors.BoundBranchConnectionFailure as e:
145
 
                raise errors.BzrCommandError(gettext(
 
145
                raise errors.CommandError(gettext(
146
146
                    'Unable to connect to current master branch %(target)s: '
147
147
                    '%(error)s To switch anyway, use --force.') %
148
148
                    e.__dict__)
163
163
                    b.controldir.destroy_branch()
164
164
                    b.controldir.set_branch_reference(to_branch, name="")
165
165
                else:
166
 
                    raise errors.BzrCommandError(
 
166
                    raise errors.CommandError(
167
167
                        gettext('Cannot switch a branch, only a checkout.'))
168
168
 
169
169