Commit Graph

58 Commits

Author SHA1 Message Date
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
Toshi MARUYAMA a7c178f6a6 scm: git: rearrange fetch_changesets() comment.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5643 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-04 23:36:57 +00:00
Toshi MARUYAMA 19c6266a7d scm: git: refactor saving a revision in model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5624 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-04 03:44:10 +00:00
Toshi MARUYAMA 36eac0dc8d scm: use i18n string at 'Path to repository' setting in Mercurial, Git, Bazaar and Darcs.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5529 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-23 07:37:03 +00:00
Toshi MARUYAMA bae1763a09 scm: set supporting directory revisions or not at scm level.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5144 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-16 00:50:11 +00:00
Toshi MARUYAMA 6dc57e752d scm: git: insert revisions to database with reverse commit order (#7821, #5357).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-10 04:30:47 +00:00
Toshi MARUYAMA 026c9e87c0 scm: add scm specific human_attribute_name for input validation.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-01 05:14:03 +00:00
Toshi MARUYAMA eb1271bb44 scm: git: use --encoding=UTF-8 in "git log" (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-28 14:12:47 +00:00
Toshi MARUYAMA d7aa303a5c scm: git: move saving changesets from adapter to model (#3396).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-28 04:46:42 +00:00
Toshi MARUYAMA 724afdf49d scm: git: implement find_changeset_by_name (#7047).
SQL "like" is slow.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4851 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-16 11:16:53 +00:00
Toshi MARUYAMA cc4e8fe0d6 scm: add scm command and version methods at repository models (#4273).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-14 08:45:34 +00:00
Toshi MARUYAMA 2e1bcb2abf Changing revision label and identifier at SCM adapter level (#3724, #6092)
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4613 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-02 09:45:05 +00:00