[DRE-maint] Bug#845180: gitlab: Branches doesn't work as branch.target is already a sha value
Zhang Jingqiang
zh_jq at outlook.com
Mon Nov 21 05:58:20 UTC 2016
Package: gitlab
Version: 8.13.3+dfsg1-2
Severity: normal
Tags: patch
Hello,
Logs when accessing Branches:
Processing by Projects::BranchesController#index as HTML
Parameters: {"namespace_id"=>"zhangjq", "project_id"=>"pstat"}
Completed 500 Internal Server Error in 72ms (ActiveRecord: 5.2ms)
NoMethodError (undefined method `sha' for "8634420d6849c47ecf70fc7ab22c40fdf5d225d3":String):
app/models/repository.rb:297:in `block in diverging_commit_counts'
lib/repository_cache.rb:20:in `fetch'
app/models/repository.rb:293:in `diverging_commit_counts'
app/controllers/projects/branches_controller.rb:15:in `block in index'
app/controllers/projects/branches_controller.rb:14:in `each'
app/controllers/projects/branches_controller.rb:14:in `reduce'
app/controllers/projects/branches_controller.rb:14:in `index'
lib/gitlab/request_profiler/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:16:in `call'
The branch.target in diverging_commit_counts is already a sha string,
to fix the problem, just remove the ".sha" method call.
It seems to be a type change of branch.target, from another object to string.
And it seems there is more code need to be fixed in app/models/repository.rb.
-- System Information:
Debian Release: stretch/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'work'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.8.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
More information about the Pkg-ruby-extras-maintainers
mailing list