Project

General

Profile

Actions

Defect #29416

open

Do not show Git revisions

Added by Alexandr Kirilov over 6 years ago. Updated about 2 years ago.

Status:
Reopened
Priority:
Normal
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

My tech-stack:
FreeBSD 11 + Apache 24 + MySQL 8 + Gitolite + Redmine 3.4.6.stable

The issue: the Redmine do not show the Git all revisions in repository but showing it if I am requesting by precise tag.

Just the same way do not working reference tag for issues. It's not gotten from repo. No any issues referenced.


Files


Related issues

Related to Redmine - Defect #26645: git 2.14 compatibilityClosed

Actions
Actions #1

Updated by Alexandr Kirilov over 6 years ago

Git wrapped out by it for covering --no-color issue

#!/usr/local/bin/bash

# The latest git version (2.14.1) removes the --no-color option which breaks existing redmine/git
# support.  We remove this option from the provided arguments until redmine fixes this,
# presumably in redmine 3.4.3
# Issue #305

REAL_GIT="/usr/local/bin/git" 
$REAL_GIT "${@%--no-color}" 
Actions #2

Updated by Alexandr Kirilov over 6 years ago

Git version

$ /usr/local/sbin/git --version --no-color
git version 2.18.0
Actions #3

Updated by Alexandr Kirilov about 6 years ago

https://www.redmine.org/boards/2/topics/55693 - there are explanation of what happening on my server

Actions #4

Updated by Alexandr Kirilov about 6 years ago

My env

$ env RAILS_ENV="production" rake about
About your application's environment
Rails version             4.2.8
Ruby version              2.4.4-p296 (amd64-freebsd11)
RubyGems version          2.7.7
Rack version              1.6.10
Middleware                Rack::Sendfile, Rack::ContentLength, ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x00000008108bb268>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETag, RequestStore::Middleware, OpenIdAuthentication
Application root          /projects/www/redmine
Environment               production
Database adapter          mysql2
Database schema version   20170419144536

The output of command that I found

$ /projects/www/redmine/bin/rails runner "Repository.fetch_changesets" -e production
fatal: '' is not a valid branch name.

The log file line

git log error: git exited with non-zero status: 128
Actions #5

Updated by Alexandr Kirilov about 6 years ago

I've been trying to fix it like over here https://www.redmine.org/issues/12505 - nothing has happened

Actions #6

Updated by Alexandr Kirilov about 6 years ago

Just tried to make version downgrade. The same issue for every version to 3.4.2 stable

$ /projects/www/redmine/bin/rails runner "Repository.fetch_changesets" -e production
fatal: '' is not a valid branch name.
Environment:
  Redmine version                3.4.2.stable
  Ruby version                   2.4.4-p296 (2018-03-28) [amd64-freebsd11]
  Rails version                  4.2.8
  Environment                    production
  Database adapter               Mysql2
SCM:
  Git                            2.18.0
  Filesystem                     
Redmine plugins:
  no plugin installed
Actions #7

Updated by Alexandr Kirilov about 6 years ago

Does anyone reading it?

Actions #8

Updated by Marius BĂLTEANU about 6 years ago

  • Status changed from New to Needs feedback
  • Assignee set to Alexandr Kirilov

Yes, it does, but we cannot check immediately all the reported issues. Please have some patience.

I'm not sure that I understand correctly your issue.

1. I didn't find anything official about "The latest git version (2.14.1) removes the --no-color option...". Can you provide a link? Also, the "--no-color" option appears in the commands used by Redmine:
- https://git-scm.com/docs/git-branch#git-branch---no-color
- https://git-scm.com/docs/git-log#git-log---no-color
- https://git-scm.com/docs/git-diff#git-diff---no-color

2. I've just installed the latest git version on my development environment and all the tests pass.

3. The method "Repository.fetch_changesets " runs successfully:

irb(main):005:0> Repository.last.fetch_changesets
  Repository Load (0.4ms)  SELECT  `repositories`.* FROM `repositories` ORDER BY `repositories`.`id` DESC LIMIT 1
Shelling out: 'git' --version
Shelling out: 'git' '--git-dir' 'tmp/test/git_repository' '-c' 'core.quotepath=false' '-c' 'log.decorate=no' 'branch' '--no-color' '--verbose' '--no-abbrev'
=> nil
Actions #9

Updated by Alexandr Kirilov about 6 years ago

Thanks for reply. I do appreciate it.

My environment:

FreeBSD 11.2
Git 2.18 (Mentioned in my post, I suppose you are not tried it on the same environment because you are mentioning Git 2.14 - suppose Linux)
Git covered by Gitolite for access via SSH
Ruby (been testing huge variation from 2.2 to lates 2.4 within huge list of variations of gems and Rails)
MySQL (version from 5.5 to 8.0)
Apache 24
Redmine version from 3.2 to lates from tar.gz archives and Github repo with using stable branches.

Redmine manifest for versions has conflict from begin:
MySQL working good from 5.0 to 5.3 - the lower available version for FreeBSD OS is 5.5
And other small issues.

In my post I've been mentioning about solution for wrapping Git there are BASH script that is cutting out this parameter, found in Stackoverflow.

For now no any interest in it since yestreday. I am so sorry, but migrated to Jira, yesterday installed. 4 weeks of seeking and researching for solution - very expensive for me. More then 100USD for small company Jira license for 2 years. I am so sorry after 5 years of using Redmine stopped.

Best regards.

Actions #10

Updated by Marius BĂLTEANU about 6 years ago

Actions #11

Updated by Marius BĂLTEANU about 6 years ago

Alexandr Kirilov wrote:

Thanks for reply. I do appreciate it.

My environment:

FreeBSD 11.2
Git 2.18 (Mentioned in my post, I suppose you are not tried it on the same environment because you are mentioning Git 2.14 - suppose Linux)
Git covered by Gitolite for access via SSH
Ruby (been testing huge variation from 2.2 to lates 2.4 within huge list of variations of gems and Rails)
MySQL (version from 5.5 to 8.0)
Apache 24
Redmine version from 3.2 to lates from tar.gz archives and Github repo with using stable branches.

Redmine manifest for versions has conflict from begin:
MySQL working good from 5.0 to 5.3 - the lower available version for FreeBSD OS is 5.5
And other small issues.

My environment is a Docker with Debian 9, Ruby 2.4.4, MySQL 5.7 and git 2.18.

In my post I've been mentioning about solution for wrapping Git there are BASH script that is cutting out this parameter, found in Stackoverflow.

For now no any interest in it since yestreday. I am so sorry, but migrated to Jira, yesterday installed. 4 weeks of seeking and researching for solution - very expensive for me. More then 100USD for small company Jira license for 2 years. I am so sorry after 5 years of using Redmine stopped.

Best regards.

Sorry for hearing this, if you want to investigate more I need a demo repository for which you receive the error. Maybe is other problem.

Actions #12

Updated by Marius BĂLTEANU almost 6 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

Please reopen if you still using Redmine and you experience the issue on the latest Redmine versions.

Actions #13

Updated by Tars Eg about 5 years ago

I have this issue. Remine version 4.0.4. Redmine doesn't show the latest revision list. If I click “View all revisions”, only the first commit is shown.

My Redmine has multiple projects, each with its own Git repository. In all other projects Redmine works fine and shows the revisions.

Actions #14

Updated by Marius BĂLTEANU about 5 years ago

  • Status changed from Closed to Reopened

Tars Eg wrote:

I have this issue. Remine version 4.0.4. Redmine doesn't show the latest revision list. If I click “View all revisions”, only the first commit is shown.

My Redmine has multiple projects, each with its own Git repository. In all other projects Redmine works fine and shows the revisions.

Can you provide a test repository that can be used to reproduce the problem?

Actions #15

Updated by Tars Eg about 5 years ago

Can you provide a test repository that can be used to reproduce the problem?

Absolutely. Though since I observe the problem only in one repository, I am not sure if creating a test repository will reproduce the issue. I can give you an access to the real one. I just wonder how we can exchange access or contact information. Everything is public here.

Actions #16

Updated by Tars Eg about 5 years ago

Tars Eg wrote:

Can you provide a test repository that can be used to reproduce the problem?

Absolutely. Though since I observe the problem only in one repository, I am not sure if creating a test repository will reproduce the issue. I can give you an access to the real one. I just wonder how we can exchange access or contact information. Everything is public here.

I have an idea. I temporarily turned on self registration on my Redmine. Can you go to ooooooooo and register? Then I will see your email and we will be able to talk about access to the problem repository. Will it do?

Actions #17

Updated by Angel Grimas over 3 years ago

Hi. Does somebody have any solution about this issue? I have the same problem but next set configuration:

Environment:
Redmine version 4.1.1.stable
Ruby version 2.5.8-p224 (2020-03-31) [x64-mingw32]
Rails version 5.2.4.2
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.27.0
Filesystem
Redmine plugins:
no plugin installed

Usually the other projects show "git repository" completly but only one project repository does not show the completed "git log" and "commits" changes.

Any suggestions ?

Actions #18

Updated by Erik E about 2 years ago

Angel Grimas wrote:

Any suggestions ?

If you still have this issue you could take a look at
How to reinit "Latest revisions" (changesets) for repository and maybe #12505

Actions

Also available in: Atom PDF