Project

General

Profile

fetch_changesets not updating project's git repository

Added by Yang Zhang over 13 years ago

rake -f /.../redmine/Rakefile redmine:fetch_changesets RAILS_ENV=production no longer seems to be working on my project's git repo. The last known commit was from 22d ago. Running the rake job produces no output (besides (in /root). How do I get to the bottom of this?

I had originally created ticket #8049 for this; that has a bit more discussion/detail. Notes from that ticket:

- It's a bare repo.
- Originally had no non-master branches. At Toshi's request I tried adding other branches - made no difference.
- git log on the repo shows all the most recent commits.
- We're using Redmine 1.0.5.
- This has not happened before for other git projects on the same Redmine site.
- This is on Ubuntu 10.04.


Replies (4)

RE: fetch_changesets not updating project's git repository - Added by Toshi MARUYAMA over 13 years ago

The reason is this line.
source:tags/1.1.2/app/models/repository/git.rb#L60

If latest changeset on your database is 15 days ago,
Redmine fetches only after 22 days ago.

RE: fetch_changesets not updating project's git repository - Added by Yang Zhang over 13 years ago

Actually, the latest commit in our DB is 22d ago. All that code seems to do is make Redmine look for newly inserted commits up to 22+7=29d ago. It doesn't explain why Redmine's not seeing any changes more recent than 22d ago.

RE: fetch_changesets not updating project's git repository - Added by Toshi MARUYAMA over 13 years ago

Sorry, I changed my previous comment.

RE: fetch_changesets not updating project's git repository - Added by Toshi MARUYAMA over 13 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'".

    (1-4/4)