diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 65b202a..523a9a6 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -280,6 +280,15 @@ {% else %} {% set patch_new_id = patch.new_oid %} {% endif %} + + {% if patch |hasattr('old_id') %} + {% set patch_old_id = patch.old_id %} + {% elif patch |hasattr('delta') %} + {% set patch_old_id = patch.delta.old_file.id %} + {% else %} + {% set patch_old_id = patch.old_oid %} + {% endif %} + {% if patch | hasattr('new_file_path') %} {% set patch_new_file_path = patch.new_file_path -%} {% if patch.new_file_path != patch.old_file_path %} @@ -316,23 +325,29 @@ {%endif%} {%endmacro%} - {% macro viewfilelink(filepath)%} + {% macro viewfilelink(filepath, identifier=False)%} {% if pull_request %} + {% if not identifier %} + {% set identifier = pull_request.branch_from %} + {% endif %} {{filepath}} @@ -406,14 +421,24 @@