Defect #7146

Git adapter lost commits before 7 days from database latest changeset

Added by Hugo Raben almost 7 years ago. Updated over 6 years ago.

Status:ClosedStart date:2010-12-21
Priority:LowDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:1.2.0
Resolution:Fixed Affected version:0.9.3

Description

Hi,

We work with several branches on a git repo, but Redmine only seems to track changes from master branch. The problem is that our commit messages like:
"Fixes #241"... do not work if they are created on a "develop" branch for example. Redmine does not "see" these commit messages, therefore it can't mark the bug as fixed.

This seems to be a bug implementation of issue #1406

Database version : Postgresql 8.3
git version: 1.5.6.5
Redmine version: 1.0.4


Related issues

Related to Redmine - Defect #6013: git tab,browsing, very slow -- even after first time Closed 2010-08-02
Related to Redmine - Defect #4549: Repository: git / view all revision fails with branches Closed 2010-01-11
Related to Redmine - Feature #6092: Truncate Git revision labels in Activity page/feed and al... Closed 2010-08-09
Related to Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be revers... New 2010-04-20
Related to Redmine - Feature #2799: Support for Bazaar's shared reposetories (created with in... New 2009-02-21
Related to Redmine - Feature #6566: Convert the git adapter to rugged New 2010-10-04
Related to Redmine - Defect #8857: Git: Too long in fetching repositories after upgrade from... Closed 2011-07-20
Related to Redmine - Defect #9472: The git scm module causes an excess amount of DB traffic. Closed 2011-10-26
Duplicated by Redmine - Defect #3940: Git: The entry or revision was not found in the rebased r... Closed 2009-09-29
Duplicated by Redmine - Defect #8049: Git: fetch_changesets not updating project's repository Closed 2011-04-02
Duplicated by Redmine - Defect #8256: 404 on repository revision access using git Closed 2011-04-30

Associated revisions

Revision 5644
Added by Toshi MARUYAMA over 6 years ago

scm: git: add comments of revision order in fetch_changesets().

Related issues.
#5357, #6013, #7146, #4773, #4547, #1406, #3449, #3567.

Revision 5660
Added by Toshi MARUYAMA over 6 years ago

scm: git: split unit adapter revisions test to with time or not (#7146, #6013).

Revision 5759
Added by Toshi MARUYAMA over 6 years ago

scm: git: add test of "latin_1_path_encoding" branch revisions with from revision in adapter test (#7146).

"latin_1_path_encoding" branch is straight line.

Revision 5760
Added by Toshi MARUYAMA over 6 years ago

scm: git: add test of revisions() in merged revisions in unit adapter test (#7146).

Git branch is a reference of specific revision.
Git branch is equivalent with Mercurial heads.
http://mercurial.selenic.com/wiki/GitConcepts?action=recall&rev=53#Branch_model

32ae898b7 in git test repository is a merged revision with two heads.
713f49446 and 4a07fe31b were in different branches before merged.
713f49446 and 4a07fe31b are descendants of 61b685fbe5.
4a07fe31b is a child of 61b685fbe5.
To get revisions from 713f4944648826f5 to master,
"git log" needs to return 4a07fe31b.

Revision 5761
Added by Toshi MARUYAMA over 6 years ago

scm: git: add another revision in merged revisions test in unit adapter test (#7146).

Revision 5762
Added by Toshi MARUYAMA over 6 years ago

scm: add "extra_info" column to repositories table and set serialize (#7146, #7047).

This column is for specific SCM.
Git 7 days problem (#7146) can not resolve unless storing branches info in database.

Revision 5763
Added by Toshi MARUYAMA over 6 years ago

scm: git: output log if revisions() catches an error (#7146).

Revision 5764
Added by Toshi MARUYAMA over 6 years ago

scm: git: add test of revisions() with invalid revision in unit adapter test (#7146).

Revision 5766
Added by Toshi MARUYAMA over 6 years ago

scm: add a repository model method "merge_extra_info()" to merge "extra_info" serializing hash yaml (#7146, #7047).

Revision 5767
Added by Toshi MARUYAMA over 6 years ago

scm: add a test of a repository model method "merge_extra_info()" in unit test (#7146, #7047).

Revision 5777
Added by Toshi MARUYAMA over 6 years ago

scm: git: back out r5673 (#7146).

recovery "block_given?" in adapter.

Revision 5783
Added by Toshi MARUYAMA over 6 years ago

scm: git: use block to call revisions() in unit adapter test_revisions_master_all() (#7146).

Revision 5784
Added by Toshi MARUYAMA over 6 years ago

scm: git: use block to call revisions() in unit adapter test_revisions_master_merged_rev() (#7146).

Revision 5785
Added by Toshi MARUYAMA over 6 years ago

scm: git: use block to call revisions() in unit adapter test_revisions_branch_latin_1_path_encoding_all() (#7146).

Revision 5786
Added by Toshi MARUYAMA over 6 years ago

scm: git: use block to call revisions() in unit adapter test_revisions_branch_latin_1_path_encoding_with_rev() (#7146).

Revision 5787
Added by Toshi MARUYAMA over 6 years ago

scm: git: use block to call revisions() in unit adapter test_revisions_invalid_rev() (#7146).

Revision 5788
Added by Toshi MARUYAMA over 6 years ago

scm: git: fix fetching 7 days problem (#7146, #6013).

Revision 5789
Added by Toshi MARUYAMA over 6 years ago

scm: git: add test of fetching invalid revision in unit model test (#7146).

Revision 8156
Added by Toshi MARUYAMA almost 6 years ago

scm: git: remove unused --since option (#4547, #4716, #7146, #6013)

History

#1 Updated by Toshi MARUYAMA almost 7 years ago

The reason is Redmine parse only 1 week before the last known commit.

See source:tags/1.0.4/app/models/repository/git.rb#L48

#2 Updated by Toshi MARUYAMA almost 7 years ago

This issue is related with #6013.

#3 Updated by Toshi MARUYAMA almost 7 years ago

  • Affected version (unused) changed from 1.0.4 to 0.9.3
  • Affected version changed from 1.0.4 to 0.9.3

#4 Updated by Toshi MARUYAMA almost 7 years ago

  • Subject changed from Make Redmine follow changes from Git non-master branches to Git adapter lost commits before 7 days
  • Priority changed from Normal to Low

#5 Updated by Toshi MARUYAMA over 6 years ago

  • Subject changed from Git adapter lost commits before 7 days to Git adapter lost commits before 7 days from database latest changeset

#6 Updated by Toshi MARUYAMA over 6 years ago

Redmine calls "git log --all --since='YYYY-MM-DD'" to fetch new changesets.
at source:1.1.2/lib/redmine/scm/adapters/git_adapter.rb#L114 .

If latest changeset in your database is "2011-03-30", Redmine calls "git log --all --since='2011-03-23'".

#7 Updated by Ling Li over 6 years ago

I am curious: Do the commits you mentioned in #8256 for ChiliProject also go to Redmine? I am confused by how these two projects progress --- would they share most of the new changes?

#8 Updated by Toshi MARUYAMA over 6 years ago

  • Assignee set to Toshi MARUYAMA

#9 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Closed
  • Target version set to 1.2.0
  • Resolution set to Fixed

Fixed in r5788.

Also available in: Atom PDF