48
48
h = self._branch.get_history()
51
raise HTTPRedirect(self._branch.url('/changes'))
53
revid = h.fix_revid(args[0])
55
path, filename, content = h.get_file(file_id, revid)
56
mime_type, encoding = mimetypes.guess_type(filename)
58
mime_type = 'application/octet-stream'
60
self.log.info('/download %s @ %s (%d bytes)', path, h.get_revno(revid), len(content))
61
response.headers['Content-Type'] = mime_type
62
response.headers['Content-Length'] = len(content)
63
response.headers['Content-Disposition'] = 'attachment; filename=%s'%(filename,)
64
response.body = content
53
raise HTTPRedirect(self._branch.url('/changes'))
55
revid = h.fix_revid(args[0])
57
path, filename, content = h.get_file(file_id, revid)
58
mime_type, encoding = mimetypes.guess_type(filename)
60
mime_type = 'application/octet-stream'
62
self.log.info('/download %s @ %s (%d bytes)', path, h.get_revno(revid), len(content))
63
response.headers['Content-Type'] = mime_type
64
response.headers['Content-Length'] = len(content)
65
response.headers['Content-Disposition'] = 'attachment; filename=%s'%(filename,)
66
response.body = content