0

For some time I have been updating changesets manually on server with following command's:

$ cd /custom/www-data/
$ source /custom/www-data/.rvm/scripts/rvm
$ ./script/rails runner "Repository.fetch_changesets" -e production
fatal: bad object beacccb6c1107dfd0c62e4dd5d7ffbded9a93af5

I suspect that it is some git commit.

I try to find this uuid in repos folder with recursive grep:

grep -rl 'beacccb6c1107dfd0c62e4dd5d7ffbded9a93af5' /data/repos

In repositories folder, but it was not successful.

How to debug Repository.fetch_changesets runned from ./script/rails runner ?

I use redmine-2.3.4 with ruby 2.0.0-p247.

2 Answers 2

0

According to http://www.redmine.org/issues/12505

You can find out which repository contained this bad objectwith following command:

$ mysql redmine

mysql> select * from repositories where extra_info like '%beacccb6c1107dfd0c62e4dd5d7ffbded9a93af5%'\G

Now you can drop and re-add this repository and everything should be ok now.

0

As I found in source:

# Redmine is able to be clever and only fetch changesets
# going forward from the most recent one it knows about.

If we use mercurial, redmine detect heads automated. If we use git, we must specify which head we want to use.

To change head in repos table I used following SQL:

UPDATE redmine.repositories SET extra_info="---
heads:
- 42ab65e323d6bcc7dbec14f0fa45d220ef5db501
db_consistent:
ordering: 1" 
WHERE id=116;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .