HTTP 500 instead of expected 404 on unresolvable direct commit link
Seen on hg-git: https://foss.heptapod.net/mercurial/hg-git/-/commit/61e085b75cd29e5b51c6d8222e4594dfc6bda765
ActionView::Template::Error (undefined method `hpd_short_display_id' for nil:NilClass):
35: = custom_icon("icon_commit")
36: %span.cgray= n_('parent', 'parents', @commit.parents.count)
37: - @commit.parents.each do |parent|
38: = link_to parent.hpd_short_display_id, project_commit_path(@project, parent), class: "commit-sha"
39: .commit-info.branches
40: .gl-spinner.vertical-align-middle
41:
The link is from mercurial/hg-git!123
I thought at first it was a mere case of obsolescence being badly handled by the Git fallback, but
61e085b75cd29e5b51c6d8222e4594dfc6bda765
is completely absent both from the Mercurial repo and .hg/git-mapfile
(that explains why the link was not converted by the migration to native of the MR)
The display name for the link is 04b6c539a8cd
, which also seems to be missing in the Mercurial repository (not just hidden) and is not a Git commit either, so I don't think it is a problem with the migration.