def __init__(self, req, env, data):
        if isinstance(data, dict):
            self.__dict__ = data
        else:
            self.__dict__ = dict(zip(self.columns, data))
        self.env = env
        self.req = req
        if self._empty('version'):
            self.version = VERSION
        if self._empty('path'):
            self.path = ''
        self.html = format_to_html(self.req, self.env, self.text)
        email = self.email_map().get(self.author, 'baba@baba.net')
        self.email_md5 = md5_hexdigest(email)
        attachment_info = self.attachment_info()
        self.is_comment_to_attachment = 'attachment' == self.type
        self.attachment_ticket = attachment_info['ticket']
        self.attachment_filename = attachment_info['filename']
        self.is_comment_to_changeset = 'changeset' == self.type
        self.is_comment_to_file = 'browser' == self.type