Project

General

Profile

Actions

Defect #9025

closed

Git: Internal Server Error whilst trying to view repo page

Defect #9025: Git: Internal Server Error whilst trying to view repo page

Added by Nathan Else over 15 years ago. Updated over 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Resolution:
Invalid
Affected version:

Description

I'm currently using the github plugin (http://mentalized.net/journal/2009/08/03/redmine_plugin_github_hook/) but when trying to view the repo page I am getting the following error:

ctionView::TemplateError (RuntimeError: ERROR  C22P02  Minvalid input syntax for integer: "e02bb32db99e03b1126c4abfd59e3e7e807d502e"   Fnumutils.c     L92     Rpg_atoi: SELECT * FROM "changesets" WHERE ("changesets"."revision" = 'e02bb32db99e03b1126c4abfd59e3e7e807d502e') AND ("changesets".repository_id = 1)  ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1) on line #19 of app/views/repositories/_dir_list_content.rhtml:

This is obviously down to using the Git Revision as the the revision ID in the database.

Updated by Nathan Else over 15 years ago Actions #1

This is the full output:

ActionView::TemplateError (RuntimeError: ERROR  C22P02  Minvalid input syntax for integer: "e02bb32db99e03b1126c4abfd59e3e7e807d502e"   Fnumutils.c     L92     Rpg_atoi: SELECT * FROM "changesets" WHERE ("changesets"."revision" = 'e02bb32db99e03b1126c4abfd59e3e7e807d502e') AND ("changesets".repository_id = 1)  ORDER BY changesets.committed_on DESC, changesets.id DESC LIMIT 1) on line #19 of app/views/repositories/_dir_list_content.rhtml:
16:           :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(entry.name)}")%>
17: </td>
18: <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
19: <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
20: <td class="revision"><%= link_to_revision(changeset.revision, @project) if changeset %></td>
21: <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
22: <td class="author"><%= changeset.nil? ? h(entry.lastrev.author.to_s.split('<').first) : changeset.author if entry.lastrev %></td>

    app/views/repositories/_dir_list_content.rhtml:19:in `_run_rhtml_app47views47repositories47_dir_list_content46rhtml_locals_dir_list_content_object'
    app/views/repositories/_dir_list_content.rhtml:1:in `each'
    app/views/repositories/_dir_list_content.rhtml:1:in `_run_rhtml_app47views47repositories47_dir_list_content46rhtml_locals_dir_list_content_object'
    app/views/repositories/_dir_list.rhtml:13:in `_run_rhtml_app47views47repositories47_dir_list46rhtml_locals_dir_list_object'
    app/views/repositories/show.rhtml:10:in `_run_rhtml_app47views47repositories47show46rhtml'
    app/controllers/repositories_controller.rb:86:in `show'
    /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'

Updated by Toshi MARUYAMA over 15 years ago Actions #2

  • Subject changed from Internal Server Error whilst trying to view repo page to Git: Internal Server Error whilst trying to view repo page
  • Category set to SCM
  • Status changed from New to Closed
  • Resolution set to Invalid

Please contact plugin author.
This is Redmine issue tracker.

Updated by Nathan Else over 15 years ago Actions #3

  • Status changed from Closed to Reopened

It is through no fault of the plugin, all I have done is clone my git repository to my home directory and pointed redmine to this repository.

It has nothing to do with the plugin.

Updated by Nathan Else over 15 years ago Actions #4

The original issue I had was with one of the columns not being long enough to hold the git revision. This is the original error:

ActiveRecord::StatementInvalid (RuntimeError: ERROR     C22026  Mvalue too long for type character varying(30)  Fvarchar.c      L470    Rvarchar: INSERT INTO "changesets" ("committed_on", "comments", "commit_date", "scmid", "user_id", "revision", "repository_id", "committer") VALUES('2011-08-08 12:30:06.000000', 'feature: ability to chose which routes a user is alerted for (geofence)', '2011-08-08 12:30:06.000000', '6341ee99e71a5da2c98fe09819a3ac1aca45f39f', NULL, 6341, 2, 'Nathan  <email@mail.com>')):

Updated by Nathan Else over 15 years ago Actions #5

This error was due to using Postgres 7.4. Upgraded to 8.4.x, re-run the migration script and it worked fine.

Updated by Toshi MARUYAMA over 15 years ago Actions #6

  • Status changed from Reopened to Closed

Redmine revision is string. There is no limit.
source:tags/1.2.1/db/migrate/091_change_changesets_revision_to_string.rb

Actions

Also available in: PDF Atom