/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: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from __future__ import absolute_import
18
 
 
19
17
import os
20
18
import time
21
19
 
54
52
            mail_client = config_stack.get('mail_client')(config_stack)
55
53
            if (not getattr(mail_client, 'supports_body', False)
56
54
                    and body is not None):
57
 
                raise errors.BzrCommandError(gettext(
 
55
                raise errors.CommandError(gettext(
58
56
                    'Mail client "%s" does not support specifying body') %
59
57
                    mail_client.__class__.__name__)
60
58
        if remember and target_branch is None:
61
 
            raise errors.BzrCommandError(gettext(
 
59
            raise errors.CommandError(gettext(
62
60
                '--remember requires a branch to be specified.'))
63
61
        stored_target_branch = branch.get_submit_branch()
64
62
        remembered_target_branch = None
74
72
            target_branch = branch.get_parent()
75
73
            remembered_target_branch = "parent"
76
74
        if target_branch is None:
77
 
            raise errors.BzrCommandError(gettext('No submit branch known or'
 
75
            raise errors.CommandError(gettext('No submit branch known or'
78
76
                                                 ' specified'))
79
77
        if remembered_target_branch is not None:
80
78
            trace.note(gettext('Using saved {0} location "{1}" to determine '
94
92
                try:
95
93
                    format = format_registry.get(formatname)
96
94
                except KeyError:
97
 
                    raise errors.BzrCommandError(
 
95
                    raise errors.CommandError(
98
96
                        gettext("No such send format '%s'.") % formatname)
99
97
 
100
98
        stored_public_branch = branch.get_public_branch()
105
103
              or (remember is None and stored_public_branch is None)):
106
104
            branch.set_public_branch(public_branch)
107
105
        if no_bundle and public_branch is None:
108
 
            raise errors.BzrCommandError(gettext('No public branch specified or'
 
106
            raise errors.CommandError(gettext('No public branch specified or'
109
107
                                                 ' known'))
110
108
        base_revision_id = None
111
109
        revision_id = None
112
110
        if revision is not None:
113
111
            if len(revision) > 2:
114
 
                raise errors.BzrCommandError(gettext('bzr send takes '
 
112
                raise errors.CommandError(gettext('bzr send takes '
115
113
                                                     'at most two one revision identifiers'))
116
114
            revision_id = revision[-1].as_revision_id(branch)
117
115
            if len(revision) == 2:
124
122
                    more_warning='Uncommitted changes will not be sent.')
125
123
            revision_id = branch.last_revision()
126
124
        if revision_id == NULL_REVISION:
127
 
            raise errors.BzrCommandError(gettext('No revisions to submit.'))
 
125
            raise errors.CommandError(gettext('No revisions to submit.'))
128
126
        if format is None:
129
127
            format = format_registry.get()
130
128
        directive = format(branch, revision_id, target_branch,
136
134
        else:
137
135
            if directive.multiple_output_files:
138
136
                if output == '-':
139
 
                    raise errors.BzrCommandError(gettext('- not supported for '
 
137
                    raise errors.CommandError(gettext('- not supported for '
140
138
                                                         'merge directives that use more than one output file.'))
141
139
                if not os.path.exists(output):
142
140
                    os.mkdir(output, 0o755)
177
175
        if not no_patch:
178
176
            patch_type = 'bundle'
179
177
        else:
180
 
            raise errors.BzrCommandError(gettext('Format 0.9 does not'
 
178
            raise errors.CommandError(gettext('Format 0.9 does not'
181
179
                                                 ' permit bundle with no patch'))
182
180
    else:
183
181
        if not no_patch: