/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/send.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:
52
52
            mail_client = config_stack.get('mail_client')(config_stack)
53
53
            if (not getattr(mail_client, 'supports_body', False)
54
54
                    and body is not None):
55
 
                raise errors.BzrCommandError(gettext(
 
55
                raise errors.CommandError(gettext(
56
56
                    'Mail client "%s" does not support specifying body') %
57
57
                    mail_client.__class__.__name__)
58
58
        if remember and target_branch is None:
59
 
            raise errors.BzrCommandError(gettext(
 
59
            raise errors.CommandError(gettext(
60
60
                '--remember requires a branch to be specified.'))
61
61
        stored_target_branch = branch.get_submit_branch()
62
62
        remembered_target_branch = None
72
72
            target_branch = branch.get_parent()
73
73
            remembered_target_branch = "parent"
74
74
        if target_branch is None:
75
 
            raise errors.BzrCommandError(gettext('No submit branch known or'
 
75
            raise errors.CommandError(gettext('No submit branch known or'
76
76
                                                 ' specified'))
77
77
        if remembered_target_branch is not None:
78
78
            trace.note(gettext('Using saved {0} location "{1}" to determine '
92
92
                try:
93
93
                    format = format_registry.get(formatname)
94
94
                except KeyError:
95
 
                    raise errors.BzrCommandError(
 
95
                    raise errors.CommandError(
96
96
                        gettext("No such send format '%s'.") % formatname)
97
97
 
98
98
        stored_public_branch = branch.get_public_branch()
103
103
              or (remember is None and stored_public_branch is None)):
104
104
            branch.set_public_branch(public_branch)
105
105
        if no_bundle and public_branch is None:
106
 
            raise errors.BzrCommandError(gettext('No public branch specified or'
 
106
            raise errors.CommandError(gettext('No public branch specified or'
107
107
                                                 ' known'))
108
108
        base_revision_id = None
109
109
        revision_id = None
110
110
        if revision is not None:
111
111
            if len(revision) > 2:
112
 
                raise errors.BzrCommandError(gettext('bzr send takes '
 
112
                raise errors.CommandError(gettext('bzr send takes '
113
113
                                                     'at most two one revision identifiers'))
114
114
            revision_id = revision[-1].as_revision_id(branch)
115
115
            if len(revision) == 2:
122
122
                    more_warning='Uncommitted changes will not be sent.')
123
123
            revision_id = branch.last_revision()
124
124
        if revision_id == NULL_REVISION:
125
 
            raise errors.BzrCommandError(gettext('No revisions to submit.'))
 
125
            raise errors.CommandError(gettext('No revisions to submit.'))
126
126
        if format is None:
127
127
            format = format_registry.get()
128
128
        directive = format(branch, revision_id, target_branch,
134
134
        else:
135
135
            if directive.multiple_output_files:
136
136
                if output == '-':
137
 
                    raise errors.BzrCommandError(gettext('- not supported for '
 
137
                    raise errors.CommandError(gettext('- not supported for '
138
138
                                                         'merge directives that use more than one output file.'))
139
139
                if not os.path.exists(output):
140
140
                    os.mkdir(output, 0o755)
175
175
        if not no_patch:
176
176
            patch_type = 'bundle'
177
177
        else:
178
 
            raise errors.BzrCommandError(gettext('Format 0.9 does not'
 
178
            raise errors.CommandError(gettext('Format 0.9 does not'
179
179
                                                 ' permit bundle with no patch'))
180
180
    else:
181
181
        if not no_patch: