97
97
The revno is encoded in decimal, the revision_id is encoded as utf8.
99
99
revno, last_revision = branch.last_revision_info()
102
100
return SmartServerResponse(('ok', str(revno), last_revision))
105
103
class SmartServerBranchRequestSetLastRevision(SmartServerLockedBranchRequest):
107
105
def do_with_locked_branch(self, branch, new_last_revision_id):
109
107
branch.set_revision_history([])
111
109
if not branch.repository.has_revision(new_last_revision_id):