Project

General

Profile

Actions

Defect #2569

closed

Git: Fetching changesets gives: fatal: Invalid revision range

Added by micah anderson over 15 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2009-01-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

I decided I wanted to have the commits be retrieved periodically by Redmine in the background for all my repositories, so I followed the FAQ: I unchecked the 'Autofetch commits' setting and then added a cron that runs:

ruby script/runner "Repository.fetch_changesets" -e production

When I run that command, I get this fatal message:

fatal: Invalid revision range 008a0eac7eb5c123c10af466a203e35037c3c128..HEAD

I'm not sure if its running the fetch properly, and I can ignore this message, or if it doesn't run it at all.

Actions #1

Updated by Jean-Philippe Lang over 15 years ago

Please read SubmittingBugs.

Actions #2

Updated by micah anderson over 15 years ago

  • your database version (eg. Postgresql 8.2)

Mysql 5.0.51a-21

  • your Ruby version (eg. ruby 1.8.6)

1.8.7.72-3

  • your Rails version (eg. Rails 1.2.6)

2.1.0-6

  • your Redmine version (pick the version number in the Affected version field) and the exact revision (eg. r1142) if you're using repository code

r2235

  • the error stack trace that you should find in the log file if your report is about an error. The message displayed by the app (eg. ...An error occurred on the page you were trying to access. If you continue...) is useless here.

There is no error log in /usr/apps/redmine/log

ruby script/about:

About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.2.0
Rails version 2.1.2
Active Record version 2.1.2
Action Pack version 2.1.2
Active Resource version 2.1.2
Action Mailer version 2.1.2
Active Support version 2.1.2
Application root /usr/apps/redmine
Environment development
Database adapter mysql

Actions #3

Updated by Jean-Philippe Lang over 15 years ago

And which SCM are you using, with version?

Actions #4

Updated by micah anderson over 15 years ago

Sorry for missing the SCM!

The system is using git, debian version 1:1.5.6.5-2.

Actions #5

Updated by Jean-Philippe Lang over 15 years ago

Is 008a0eac7eb5c123c10af466a203e35037c3c128 a valid commit identifier of your git repository?
Maybe this commit was undo'ed?

Actions #6

Updated by micah anderson over 15 years ago

Ok, I've got 13 repositories I'm working with, so I narrowed it down to one particular one.

I am not exactly sure what the right way to determine if a particular commit-id is a valid one for this repository, but this did not return anything:

git log |grep 008a0eac7eb5c123c10af466a203e35037c3c128

Do you have a better mechanism I can try?

What is it that redmine is doing here on the git end of things? If I knew that maybe I could try and figure out what I need to do to fix up my git repository?

Actions #7

Updated by Jean-Philippe Lang over 15 years ago

What is it that redmine is doing here on the git end of things?

Redmine tries to import commit logs into its database. 008a0eac7eb5c123c10af466a203e35037c3c128 is the last known commit, and thus Redmine tries to fetch all the commits that occured after this one, using something like:

git log 008a0eac7eb5c123c10af466a203e35037c3c128..

The problem is 008a0eac7eb5c123c10af466a203e35037c3c128 doesn't seem to exist any more in your repository.

Can you try to remove the repository from Redmine and re-import it?

Actions #8

Updated by Wes Hays about 15 years ago

I had the same issue:


Counting objects: 11, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 559 bytes, done.
Total 6 (delta 4), reused 2 (delta 1)
To [COMMENTED OUT PATH TO PROJECT]
   861767c..18eb242  master -> master
fatal: Invalid revision range ec6878c2ea58718c4e2a48792f9d8f456f4108fe..HEAD

The problem turned out to not be the actual project's git repositor I was working on but in the Redmine database itself. I resolved the issue by truncating (emptying) the "changes", "changesets", and "changeset_issues" tables. Then the next time I push an update it took a while, maybe 3 minutes, to rebuild all the entries in those tables but I no longer saw the fatal error.

Hope this helps someone.

Actions #9

Updated by Wes Hays about 15 years ago

Wes Hays wrote:

I had the same issue:

[...]

The problem turned out to not be the actual project's git repository I was working on but in the Redmine database itself. I resolved the issue by truncating (emptying) the "changes", "changesets", and "changeset_issues" tables. Then the next time I push an update it took a while, maybe 3 minutes, to rebuild all the entries in those tables but I no longer saw the fatal error.

Hope this helps someone.

Actions #10

Updated by micah anderson about 15 years ago

Removing the changesets from the database and then re-importing everything seemed to make the error go away.

Actions #11

Updated by Toshi MARUYAMA about 13 years ago

  • Subject changed from Fetching changesets gives: fatal: Invalid revision range to Git: Fetching changesets gives: fatal: Invalid revision range
Actions #12

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from New to Closed

Git adapter refactored in 0.9.0 and 0.9.3.
This issue is obsolete.

Actions

Also available in: Atom PDF