- {% set count = 0 %}
{% for patch in diff %}
- {% set count = count+1 %}
- {% set linesadded = patch.line_stats[1] %}
- {% set linesremoved = patch.line_stats[2] %}
+ {% set linesadded = patch.line_stats[1] %}
+ {% set linesremoved = patch.line_stats[2] %}
{% if patch | hasattr('new_file_path') %}
{%- if patch.new_file_path == patch.old_file_path -%}
{%- if patch.status == 'D' -%}
- {{ changesdeletedfile(patch.new_file_path, linesadded, linesremoved, count) }}
+ {{ changesdeletedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}
{%-elif patch.status == 'A' -%}
- {{ changesaddedfile(patch.new_file_path, linesadded, linesremoved, count) }}
+ {{ changesaddedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}
{%-elif patch.status == 'M' -%}
- {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, count) }}
+ {{ changeschangedfile(patch.new_file_path, linesadded, linesremoved, loop.index) }}
{%-endif-%}
{%- else -%}
- {{changesrenamedfile(patch.old_file_path, patch.new_file_path, linesadded, linesremoved, count)}}
+ {{changesrenamedfile(patch.old_file_path, patch.new_file_path, linesadded, linesremoved, loop.index)}}
{%- endif -%}
{%- elif patch | hasattr('delta') -%}
{%- if patch.delta.new_file.path == patch.delta.old_file.path -%}
{%- if patch.delta.new_file.mode == 0
and patch.delta.old_file.mode in [33188, 33261] -%}
- {{ changesdeletedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}
+ {{ changesdeletedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}
{%-elif patch.delta.new_file.mode in [33188, 33261]
and patch.delta.old_file.mode == 0 -%}
- {{ changesaddedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}
+ {{ changesaddedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}
{%-elif patch.delta.new_file.mode in [33188, 33261]
and patch.delta.old_file.mode in [33188, 33261] -%}
- {{ changeschangedfile(patch.delta.new_file.path, linesadded, linesremoved, count) }}
+ {{ changeschangedfile(patch.delta.new_file.path, linesadded, linesremoved, loop.index) }}
{%-endif-%}
{%- else -%}
- {{changesrenamedfile(patch.delta.old_file.path, patch.delta.new_file.path, linesadded, linesremoved, count)}}
+ {{changesrenamedfile(patch.delta.old_file.path, patch.delta.new_file.path, linesadded, linesremoved, loop.index)}}
{%- endif -%}
{%- endif -%}
{% endfor %}
diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py
index 1343808..c3e3a14 100644
--- a/pagure/ui/fork.py
+++ b/pagure/ui/fork.py
@@ -798,8 +798,8 @@ def reopen_request_pull(repo, requestid, username=None, namespace=None):
flask.flash('Invalid input submitted', 'error')
return flask.redirect(flask.url_for(
- 'ui_ns.request_pull', repo=repo, username=username, namespace=namespace,
- requestid=requestid))
+ 'ui_ns.request_pull', repo=repo, username=username,
+ namespace=namespace, requestid=requestid))
@UI_NS.route(
diff --git a/tests/test_pagure_flask_ui_fork.py b/tests/test_pagure_flask_ui_fork.py
index be139dd..c5797c7 100644
--- a/tests/test_pagure_flask_ui_fork.py
+++ b/tests/test_pagure_flask_ui_fork.py
@@ -383,7 +383,7 @@ class PagureFlaskForktests(tests.Modeltests):
self.assertIn(
'
\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -407,7 +407,7 @@ class PagureFlaskForktests(tests.Modeltests):
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -432,7 +432,7 @@ class PagureFlaskForktests(tests.Modeltests):
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -572,7 +572,7 @@ class PagureFlaskForktests(tests.Modeltests):
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -778,7 +778,7 @@ class PagureFlaskForktests(tests.Modeltests):
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1624,7 +1624,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1653,7 +1653,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1678,7 +1678,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1712,7 +1712,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1781,7 +1781,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1806,7 +1806,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -1856,7 +1856,7 @@ index 0000000..2a552bb
self.assertIn('Pull-request **un**tagged with: black', output.get_data(as_text=True))
self.assertIn('Pull-request tagged with: blue, yellow', output.get_data(as_text=True))
-
+
user.username = 'pingou'
with tests.user_set(self.app.application, user):
@@ -2736,7 +2736,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
@@ -2774,7 +2774,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -2835,7 +2835,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
@@ -2871,17 +2871,17 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n',
output_text)
# Checking if Edited by User is there or not
self.assertTrue(
- 'Edited just now by pingou '
+ 'Edited just now by pingou '
in output_text
or
- 'Edited seconds ago by pingou '
+ 'Edited seconds ago by pingou '
in output_text)
self.assertIn(
'\n Comment updated', output_text)
@@ -2926,7 +2926,7 @@ index 0000000..2a552bb
self.assertIn(
'\n \n '
'
\n '
- '
#1\n '
'
\n '
'PR from the feature branch\n', output_text)
diff --git a/tests/test_pagure_flask_ui_remote_pr.py b/tests/test_pagure_flask_ui_remote_pr.py
index 89493cc..dc44885 100644
--- a/tests/test_pagure_flask_ui_remote_pr.py
+++ b/tests/test_pagure_flask_ui_remote_pr.py
@@ -262,9 +262,15 @@ class PagureRemotePRtests(tests.Modeltests):
output_text)
# Show the filename in the Changes summary
self.assertIn(
- '.gitignore', output_text)
+ 'sources', output_text)
+ '