{% extends "repo.html" %} {% set active_page = "log" %} {% block title %} {% trans message=data.message|split("\n\n")|first, username=username, repository=repository %}{{ basename }} in {{ username }}/{{ repository }}{% endtrans %} {% endblock %} {% block content %}

{{ data.message | split("\n\n", 1) | first | inline_markdown }}

{{ data.message | split("\n\n", 1) | last | markdown }}

{{ data.owner_name }},
{% trans receive_date=data.receive_date.strftime('%A, %e %B %Y, %H:%M:%S'), author_date=data.author_date.strftime("%A, %e %B %Y, %H:%M:%S"), receive_unix=data.receive_date.timestamp() | int, author_unix=data.author_date.timestamp() | int %} created on {{ author_date }} ({{ author_unix }}), received on {{ receive_date }} ({{ receive_unix }}) {% endtrans %}
{% trans %}Author identity:{% endtrans %} {{ data.owner_identity | harvester_protection | safe }}

{{ data.sha }} {% for file in diff %}

{{ file }}

{% set vars = namespace(original_line=0, modified_line=0, hunk_started=false, actual_line=0, line_type=0) %} {% for line in diff[file] %} {% if line.startswith("@@") %} {% if vars.hunk_started %} {% endif %} {% set vars.hunk_started = true %} {% set diff_location = line|parse_diff_location %} {% set vars.original_line = diff_location[0][0] %} {% set vars.modified_line = diff_location[1][0] %}

{{ line }}

                                {% elif vars.hunk_started %}
                                    {% if line.startswith("+") %}
                                        
                                        {{ line[1:] }}
                                        {% set vars.actual_line = vars.modified_line %}
                                        {% set vars.line_type = 1 %}
                                        {% set vars.modified_line = vars.modified_line + 1 %}
                                    {% elif line.startswith("-") %}
                                        
                                        {{ line[1:] }}
                                        {% set vars.actual_line = vars.original_line %}
                                        {% set vars.line_type = 0 %}
                                        {% set vars.original_line = vars.original_line + 1 %}
                                    {% elif not line.startswith("\\") %}
                                        {% if line %}
                                            
                                            {{ line[1:] }}
                                        {% endif %}
                                        {% if not line.startswith("@@") %}
                                            {% set vars.actual_line = vars.modified_line %}
                                            {% set vars.line_type = 1 %}
                                            {% set vars.original_line = vars.original_line + 1 %}
                                            {% set vars.modified_line = vars.modified_line + 1 %}
                                        {% endif %}
                                    {% endif %}
                                {% endif %}
                                {% for comment in comment_query.filter_by(commit=data, file=file, line_number=vars.actual_line, line_type=vars.line_type, state=1).all() %}
                                    
{{ comment.text | safe }} {# this was generated by the markdown parser which escapes HTML #}
{% trans %}by{% endtrans %} {{ comment.owner.username }}, {{ comment.date | strftime('%A, %e %B %Y, %H:%M:%S') }} {% if comment.author == current_user or data.owner == current_user or permission_level >= 2 %}
{% endif %}
{% endfor %} {% if comment_query.filter_by(commit=data, file=file, line_number=vars.actual_line, line_type=vars.line_type, state=0).count() %}
{% trans count=comment_query.filter_by(commit=data, file=file, line_number=vars.actual_line, line_type=vars.line_type, state=0).count() %}Resolved comments ({{ count }}){% endtrans %} {% for comment in comment_query.filter_by(commit=data, file=file, line_number=vars.actual_line, line_type=vars.line_type, state=0).all() %}
{{ comment.text | safe }} {# this was generated by the markdown parser which escapes HML #} {% if comment.author == current_user or data.owner == current_user or permission_level >= 2 %}
{% endif %}
{% endfor %}
{% endif %} {% endfor %} {% if vars.hunk_started %}
{# close the last hunk #} {% endif %}
{% endfor %}
{% endblock %} {% block scripts %} {% endblock %}