146
146
if not branch.repository.has_revision(new_last_revision_id):
147
147
return FailedSmartServerResponse(
148
148
('NoSuchRevision', new_last_revision_id))
150
151
return SuccessfulSmartServerResponse(('ok',))
153
154
class SmartServerBranchRequestSetLastRevisionEx(SmartServerSetTipRequest):
155
156
def do_tip_change_with_locked_branch(self, branch, new_last_revision_id,
156
157
allow_divergence, allow_overwrite_descendant):
157
158
"""Set the last revision of the branch.
161
162
:param new_last_revision_id: the revision ID to set as the last
163
164
:param allow_divergence: A flag. If non-zero, change the revision ID