The filename should show up in the UI like it does for normal files, but it doesn't. For example in https://pagure.io/workstation-ostree-config/pull-request/109#request_diff you see:
I'm also hitting this issue. Furthermore, trying to display a PR that contains a symlink returns 500 (with Pagure 5.3). The traceback is:
Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python2.7/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/lib/python2.7/site-packages/pagure/ui/fork.py", line 352, in request_pull trigger_ci_pr_form=trigger_ci_pr_form, File "/usr/lib/python2.7/site-packages/flask/templating.py", line 135, in render_template context, ctx.app) File "/usr/lib/python2.7/site-packages/flask/templating.py", line 117, in _render rv = template.render(context) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render return self.environment.handle_exception(exc_info, True) File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python2.7/site-packages/pagure/templates/repo_pull_request.html", line 12, in top-level template code {% set tag = "home" %} File "/usr/lib/python2.7/site-packages/pagure/templates/repo_master.html", line 34, in top-level template code {% set tag = "home" %} File "/usr/lib/python2.7/site-packages/pagure/templates/master.html", line 160, in top-level template code {% block content %}{% endblock %} File "/usr/lib/python2.7/site-packages/pagure/templates/repo_master.html", line 425, in block "content" {% block repo %} File "/usr/lib/python2.7/site-packages/pagure/templates/repo_pull_request.html", line 367, in block "repo" {{repo_renderdiff(diff=diff, File "/usr/lib/python2.7/site-packages/jinja2/runtime.py", line 579, in _invoke rv = self._func(*arguments) File "/usr/lib/python2.7/site-packages/pagure/templates/_repo_renderdiff.html", line 87, in template {% set patchstats = (patch | patch_stats) %} File "/usr/lib/python2.7/site-packages/pagure/ui/filters.py", line 838, in get_patch_stats output = pagure.lib.git.get_stats_patch(patch) File "/usr/lib/python2.7/site-packages/pagure/lib/git.py", line 2703, in get_stats_patch output["status"] = status UnboundLocalError: local variable 'status' referenced before assignment
The reason for this is that the pagure.lib.git.get_stats_patch fails to assign status, as it doesn't recognize the new file mode for symlink. In an interactive console, I'm getting this for the patch that makes this fail:
pagure.lib.git.get_stats_patch
>>> patch.delta.new_file.mode 40960L >>> oct(40960L) '0120000L'
Metadata Update from @bkabrda: - Issue assigned to bkabrda
Metadata Update from @pingou: - Issue set to the milestone: 5.4
Commit dade63be fixes this issue