Learn more about these different git repos.
Other Git URLs
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:
<img alt="Screenshot_2018-11-12_PR109_WIP_Silverblue_using_coreos-assembler_-_workstation-ostree-config_-_Pagure_io.png" src="/pagure/issue/raw/files/b673ea98c8b0fe298b231445d03450b6ce6d5c2359b6273932b186b9f5ef8c55-Screenshot_2018-11-12_PR109_WIP_Silverblue_using_coreos-assembler_-_workstation-ostree-config_-_Pagure_io.png" />
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 dade63b fixes this issue
Log in to comment on this ticket.