Commit Graph

37 Commits

Author SHA1 Message Date
Toshi MARUYAMA 55a8087f67 Rails3: scm: mercurial: 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@8976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-24 14:59:54 +00:00
Toshi MARUYAMA 6bdc2c36f1 scm: mercurial: use to_s for revision in find_changeset_by_name method
On Rails 3.0.11, functional test fails.

<pre>
Error: test_diff_two_revs(RepositoriesMercurialControllerTest)
NoMethodError: undefined method `empty?' for 4:Fixnum
app/models/repository/mercurial.rb:76:in `find_changeset_by_name'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-23 12:18:30 +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 9e238171ca scm: model: mercurial: set revision graph support true (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7718 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-03 08:12:47 +00:00
Toshi MARUYAMA d10102e940 scm: mercurial: model: save parent/child relation for changesets (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7713 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-03 08:03:16 +00:00
Toshi MARUYAMA c2e9e2cf56 scm: mercurial: do nothing in fetching if info is nil (#8777).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6246 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-11 00:56:09 +00:00
Toshi MARUYAMA 7dcdd2f171 scm: mercurial: remove return value from model fetch_changesets().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6219 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-07-10 11:07:37 +00:00
Toshi MARUYAMA a267babfe8 scm: mercurial: code clean up model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5931 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-26 10:12:00 +00:00
Toshi MARUYAMA adbe6af44a scm: mercurial: use regexp %r{} instead of // in model latest_changesets_cond().
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5930 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-26 10:11:31 +00:00
Toshi MARUYAMA 1a947a1617 scm: mercurial: remove trailing white-spaces from model source.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5756 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-12 07:52:14 +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 82d5de4b4e scm: mercurial: change "url" human attribute name from "Root directory" to "Path to repository".
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-23 04:41:26 +00:00
Toshi MARUYAMA 2a161b4576 scm: mercurial: increase limit of branch directory latest changesets.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5146 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-16 00:50:53 +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 cf2b4d49f0 scm: mercurial: branches and tags are enable in model (#1981, #7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5129 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-14 13:41:52 +00:00
Toshi MARUYAMA 8944150ace scm: mercurial: latest changesets support named branch (#7246).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5127 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-14 13:41:01 +00:00
Toshi MARUYAMA c8ce22c275 scm: mercurial: latest changesets improvement and supporting tag (#1981).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5123 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-14 10:36:34 +00:00
Toshi MARUYAMA 0d63e9e8fd scm: mercurial: add :order => 'id DESC' explicitly for MySQL test fails.
Because :order => 'id DESC' is defined at 'has_many',
there is no need to set 'order'.
But, MySQL test fails.
Sqlite3 and PostgreSQL pass.
Is this MySQL bug?

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-11 07:34:14 +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 06f078a813 scm: ignore log encoding setting in Subversion and Mercurial (#7597).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4962 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-28 12:09:32 +00:00
Toshi MARUYAMA 0247a149c4 scm: mercurial: temporary disable tags and branches at model (#1981, #7246, #4455).
Until latest_changesets supports tags and branches.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4871 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-18 07:14:32 +00:00
Toshi MARUYAMA b3c517387a scm: mercurial: improvement latest_changesets without supporting tags and named branches (#4455).
Based on latest-changesets-improvements-2.diff of #6159.
http://www.redmine.org/attachments/4332/latest-changesets-improvements-2.diff

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4868 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-18 05:55:02 +00:00
Toshi MARUYAMA 1f836a1d43 scm: mercurial: rewrite MercurialAdapter#entries to show per-file change log and size (#3421, #4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-16 13:35:52 +00:00
Toshi MARUYAMA 5274230fda scm: mercurial: refactor Repository::Mercurial#fetch_changesets (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4849 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-16 07:32:35 +00:00
Toshi MARUYAMA 08ed9cb5d5 scm: mercurial: change identifier to revision in fetching revisions.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4847 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-16 07:31:52 +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 89627d0334 scm: mercurial: fix error on revision page for empty revision (#7307).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4704 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-13 12:04:51 +00:00
Toshi MARUYAMA eda1cd2faa scm: mercurial: change two revision diff text of mercurial (#3724).
For example, "4:def6d2f1254a 2:400bb8672109".

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4699 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-11 16:04:28 +00:00
Toshi MARUYAMA fdd0a2ca9b scm: mercurial: use revision text mercurial style "2:400bb8672109" (#3724).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4697 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-11 16:03:45 +00:00
Toshi MARUYAMA d67185ec7e scm: mercurial: use scmid as identifier (#3724).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4695 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-11 16:03:01 +00:00
Toshi MARUYAMA e2df831b53 scm: mercurial: accept both of revision and nodeid as changeset id (#3724).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-08 06:24:27 +00:00
Toshi MARUYAMA 2ae2d3ef83 Fixed: repository: mercurial: sort changesets by revision (#3449, #3567).
In DVCS, changesets are not in date order.
Because Mercurial backend inserts changesets from eariest, 'ORDER BY id'
means 'order by revision number'.

Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4611 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-02 06:05:54 +00:00
Eric Davis 39c585740d Refactor: Extract method to create a Change from a Changeset.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3360 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-02 17:02:32 +00:00
Jean-Philippe Lang 7aaa538fd9 Fixed: error when browsing an empty Mercurial repository (#1046).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1343 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-04-12 17:13:17 +00:00
Jean-Philippe Lang beff2c54bc Mercurial: display working directory files sizes unless browsing a specific revision (#999).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1333 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-04-06 12:22:59 +00:00
Jean-Philippe Lang 01fdaf5977 Mercurial adapter:
* fetch changesets by batches of 100 (rather than in a single transaction)
* fix: fetch_changesets tries to re-insert the last revision that exists in the db (#860)

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1255 e93f8b46-1217-0410-a6f0-8f06a7374b81
2008-03-15 10:30:56 +00:00
Jean-Philippe Lang 438161ad1f Added basic support for CVS and Mercurial SCMs.
Browsing, changesets fetching and diff viewing are implemented.
Only tested with local repositories.

Thanks to Ralph Vater for CVS specific code.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@559 e93f8b46-1217-0410-a6f0-8f06a7374b81
2007-06-12 20:12:05 +00:00