Commit Graph

69 Commits

Author SHA1 Message Date
Toshi MARUYAMA d45bf0a83e scm: split Repository#entries (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12754 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 00:40:59 +00:00
Toshi MARUYAMA 619857e1a4 remove unneeded Relation#all from Repository::Git model
git-svn-id: http://svn.redmine.org/redmine/trunk@12743 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 10:15:52 +00:00
Toshi MARUYAMA 8574948617 code format clean up Repository::Git model
git-svn-id: http://svn.redmine.org/redmine/trunk@12742 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 10:15:37 +00:00
Toshi MARUYAMA 35cc911192 update copyright year (#15977)
Contributed by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 22:45:39 +00:00
Jean-Philippe Lang f9ddb562d5 Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-06-12 19:13:25 +00:00
Jean-Philippe Lang e396a0eebe Copyright for 2013 (#12788).
Patch by Daniel Felix.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-12 09:29:31 +00:00
Jean-Philippe Lang 049eaeb776 Repository changesets are already sorted by committed_on DESC (#12713).
SQLServer raises an error because committed_on is specified twice in the order by list.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11101 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-01-03 11:40:39 +00:00
Toshi MARUYAMA f6367b8ba7 scm: git: fix tests fail when extra_info is nil (#12409)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10857 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 08:17:56 +00:00
Toshi MARUYAMA 5d8d38aa60 scm: git: fix changesets aren't read after clear_changesets call (#12409)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-11-21 07:44:29 +00:00
Jean-Philippe Lang f673027bc1 Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9807 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:38:31 +00:00
Jean-Philippe Lang 7c105ec9e9 Adds a method to load changesets for repository entries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9805 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-10 18:32:09 +00:00
Toshi MARUYAMA 29782860b7 scm: mercurial: git: save parents in creating changesets (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9311 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-03 08:05:30 +00:00
Toshi MARUYAMA f36eb54141 scm: git: use Changeset#create and Changeset#create_change as same with Subversion and Mercurial
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9290 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-29 22:41:20 +00:00
Toshi MARUYAMA 76435033e7 scm: git: add the comment of the reason to scan database in fetching every time (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9287 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-29 10:05:13 +00:00
Toshi MARUYAMA 27dca22c91 scm: git: fix typo in fetching revisions comment.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9286 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-29 02:42:20 +00:00
Toshi MARUYAMA 5232d379f9 scm: git: fix model source indents (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9284 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-28 17:18:19 +00:00
Toshi MARUYAMA 9b333e1c87 scm: git: process new git revisions all at once rather than per branch (#10470)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9283 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-28 17:18:04 +00:00
Toshi MARUYAMA 0cbbb9fda8 remove trailing white-space from app/models/repository/git.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9145 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-07 07:56:30 +00:00
Toshi MARUYAMA 999a4ba30d scm: git: performance improvements in fetching revisions (#8857, #9472)
Parse a revision for a given branch,
just if we haven't parsed it for any branches before.
Moved the db check to for existing revisions into a grouped search.
Search for many revisions at once: this reduces db load.
Revisions are grouped into sets of 100.
This is to improve memory consumption.
There will be just one query instead of each 100.
The above two methods significantly increase parsing speed.
Test case was a git repo with 6000+ commits on a master branch,
and several other branches originating for master.
Speed improved from 1.4h to 18min.

Contributed by Gergely Fábián.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9144 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-07 07:56:15 +00:00
Toshi MARUYAMA bcba955456 scm: git: reduce saving heads times in fetching revisions (#8857, #9472)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9143 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-07 05:57:59 +00:00
Toshi MARUYAMA f0987e4b8f scm: git: backout r8839 (#8857)
call "git log" only once instead of per branch in fetching revisions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9142 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-07 05:57:44 +00:00
Toshi MARUYAMA 374c2aa705 scm: git: backout r8840 (#8857, #9472)
reduce saving heads times in fetching revisions.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9141 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-03-07 05:57:29 +00:00
Toshi MARUYAMA ebb109b67e Rails3: scm: git: use .to_s for overriding human_attribute_name parameter
On Rails 3.0.11, parameter is symbol not string in activerecord validation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-24 14:59:31 +00:00
Toshi MARUYAMA 165327a074 scm: git: reduce saving heads times in fetching revisions (#8857, #9472)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8840 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-11 05:42:43 +00:00
Toshi MARUYAMA 1e5f16722f scm: git: call "git log" only once instead of per branch in fetching revisions (#8857)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8839 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-11 05:42:06 +00:00
Toshi MARUYAMA d90cdb1b10 scm: git: raise exception if "git log" is error and block is given in lib revision method (#8857)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8837 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-10 22:56:54 +00:00
Toshi MARUYAMA 693191e8bf scm: git: add model method to get heads from extra_info branches hash (#8857)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-09 00:11:03 +00:00
Toshi MARUYAMA adb81b1ff6 scm: git: split fetch_changesets method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8814 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-08 11:10:46 +00:00
Jean-Philippe Lang 5eed64b848 human_attribute_name accepts optional argument.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8286 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-12-18 13:20:19 +00:00
Toshi MARUYAMA 57afa111a9 scm: model: git: set revision graph support true (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7717 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-03 08:12:24 +00:00
Toshi MARUYAMA f63dc936ad scm: git: model: save parent/child relation for changesets (#5501)
Contributed by Jan Topiński.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7711 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-03 08:02:22 +00:00
Toshi MARUYAMA 370de46974 scm: git: fix typo of comments about fetching revisions (#9472)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7660 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-27 01:31:56 +00:00
Toshi MARUYAMA 01d3af65b3 scm: git: recovery and improve comments of fetching from 1.1 about harmful influence that git does not have the revision number (#9472)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7658 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-27 00:35:43 +00:00
Toshi MARUYAMA 8dc7f1d1ee scm: git: return saved revision at model "save_revision" (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-25 14:58:03 +00:00
Toshi MARUYAMA 55c98d4297 scm: git: use to_s for branches at model (#5501)
"scm.branches" will extend to have the revision for the branch.
no "to_s" will have a problem.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7653 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-10-25 14:57:34 +00:00
Toshi MARUYAMA ed37d8ed91 scm: git: catch exception in model default_branch() (#8458, #6713).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6220 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-10 11:08:00 +00:00
Toshi MARUYAMA 5cfc42982b scm: return nil at model default_branch and override at git model (#8458, #6713).
Redmine Git and Mercurial adapter support *branches*.
Mercurial default branch is *dafault*.
But, it is popular to show all revisions on the top page for Mercurial GUI.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6130 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-30 03:46:32 +00:00
Toshi MARUYAMA f1f4362b50 scm: git: brush up model fetch_changesets() comment.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5858 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-19 22:58:38 +00:00
Toshi MARUYAMA fe7e8fa590 scm: git: use hash#dup for extra_info in model fetch_changesets().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-19 02:38:14 +00:00
Toshi MARUYAMA 098655dbd0 scm: git: set revisions ordering inconsistent in existing database (#5357).
Between version 0.9 r2840 (#1406) and version 1.2 r5073 (#7821, #5357),
git revisions are stored as *C-B-A-F-E-D* in database.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5853 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-19 02:16:27 +00:00
Toshi MARUYAMA 7ca5a4939e scm: git: fix fetching 7 days problem (#7146, #6013).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5788 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-13 10:38:45 +00:00
Toshi MARUYAMA d65c3d438d scm: git: show only filename and filesize if setting of reporting last commit is disable (#8365, #7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5775 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-13 03:55:21 +00:00
Toshi MARUYAMA d21b35d32a scm: git: get "extra_report_last_commit" value from extra_info (#8365, #7047).
Browsing repository tree performance problem is git only.
So, adding new "report_last_commit" column is very expensive.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5768 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-13 03:51:14 +00:00
Toshi MARUYAMA cddc5f70a3 scm: git: code clean up model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5750 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-12 07:06:57 +00:00
Toshi MARUYAMA 773b248669 scm: git: change model report_last_commit() name to extra_report_last_commit() (#7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5661 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-06 03:43:11 +00:00
Toshi MARUYAMA 114e3f3b82 scm: git: use the model value of whether reporting last commit in repository tree (#7047).
And remove entries_git() and the flag in adapter.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5657 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 11:43:29 +00:00
Toshi MARUYAMA 03fb61a782 scm: git: add the model method whether reporting last commit in repository tree (#7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5656 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 11:43:09 +00:00
Toshi MARUYAMA 12f4b8b6d9 scm: git: override entries() in model for browsing tree performance (#7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5655 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 11:42:46 +00:00
Toshi MARUYAMA 9c3a9fdd87 scm: git: fix indent in model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5652 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 06:13:23 +00:00
Toshi MARUYAMA 2336093739 scm: git: add comments of revision order in fetch_changesets().
Related issues.
#5357, #6013, #7146, #4773, #4547, #1406, #3449, #3567.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5644 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-04 23:38:11 +00:00