112
115
).get_user_option_as_bool('send_strict')
113
116
if strict is None: strict = True # default value
114
117
if strict and tree is not None:
117
119
raise errors.UncommittedChanges(
118
120
tree, more='Use --no-strict to force the send.')
119
121
if tree.last_revision() != tree.branch.last_revision():
120
122
# The tree has lost sync with its branch, there is little
121
123
# chance that the user is aware of it but he can still force
123
125
raise errors.OutOfDateTree(
124
126
tree, more='Use --no-strict to force the send.')
125
127
revision_id = branch.last_revision()
126
128
if revision_id == NULL_REVISION:
127
129
raise errors.BzrCommandError('No revisions to submit.')
130
131
format = format_registry.get()
131
132
directive = format(branch, revision_id, submit_branch,
132
133
public_branch, no_patch, no_bundle, message, base_revision_id)