Closed sdinot closed 10 years ago
I think this is linked to http://www.redmine.org/issues/5357
The revision order in git is provided only by the linked list nature of revisions, i.e. a revision holds a reference to its parent revision, which in turn holds a reference to its parent, and so on.
I don't know if it can be easily fixed.
I've done the test and it seems to work:
Which version of Redmine are you running?
Hi Nicolas,
Thank you for investigating this issue.
I am not familiar with the database model of Redmine but what do you think about the following kind of query ?
SELECT c.commit_date AS date, COUNT(c.id) AS changes FROM changesets AS c JOIN repositories AS r ON c.repository_id = r.id JOIN users AS u ON c.user_id = u.id WHERE r.identifier = 'zoinx-orekit' AND u.mail = 'luc@orekit.org' GROUP BY c.commit_date ORDER BY c.commit_date DESC;
date | changes |
---|---|
2014-05-27 | 2 |
2014-05-16 | 7 |
2014-05-15 | 2 |
2014-05-14 | 2 |
2014-05-06 | 1 |
2014-04-09 | 2 |
2014-04-07 | 2 |
2014-03-21 | 2 |
2014-03-09 | 3 |
2014-03-07 | 2 |
2014-03-01 | 1 |
... | ... |
Administration => Informations:
I think that I have found the problem. There are some missing ".order(:commit_date)" in the repository_patch.rb file:
I've tested your patch and it's still working for me :) Does it work for you?
Yes, my patch works for me. I use PostgreSQL, do you use MySQL? If that is the case, maybe that MySQL returns ordered results when a GROUP BY clause is used but not PostgreSQL.
I use PostgreSQL, do you use MySQL? If that is the case, maybe that MySQL returns ordered results when a GROUP BY clause is used but not PostgreSQL.
Maybe. That's very possible. In all cases it will be in next release (v0.7.4) ;)
Thank you!
For testing purpose:
I imported a third party repository (Orekit sources) :
$ git clone http://www.orekit.org/git/orekit $ cd orekit $ git remote add myforge ssh://git@forge.....net/zoinx/zoinx-orekit.git $ git push myforge master
Dates are mixed up in the contributors statistics tab: