Commit Graph

79 Commits

Author SHA1 Message Date
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 87f284dcb6 Repository Identifier should be frozen (#11109).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-07-26 17:41:47 +00:00
Jean-Philippe Lang 26e75568cf Makes repository url read-only after saving.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9878 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-20 18:45:51 +00:00
Jean-Philippe Lang 585d08765e Safe attributes for repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-19 19:47:54 +00:00
Jean-Philippe Lang 3b854bee59 Make repository identifier accept underscores (#11192).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-19 19:12:17 +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
Jean-Philippe Lang 2cbf9c9cc4 Renamed #changes association to #filechanges (clash with AR::Base.changes that triggers errors with Rails 3.2.5).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9759 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-06-03 11:46:58 +00:00
Jean-Philippe Lang ba5a052c8c Copyright update.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-05 12:56:53 +00:00
Jean-Philippe Lang 9f396a6dfb Fixed undefined method `<=>' for nil:NilClass when sorting repositories with nil identifiers (#10827).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9619 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-04 16:57:15 +00:00
Toshi MARUYAMA 2c28d6b5d1 scm: git: fix creating and updating repository
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9616 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-05-03 11:48:33 +00:00
Jean-Philippe Lang 5e57a1a9d9 Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-04-25 17:17:49 +00:00
Toshi MARUYAMA cd9b62d734 Rails3: scm: use .to_s for overriding human_attribute_name parameter at repository model
On Rails 3.0.11, parameter is symbol not string in activerecord validation.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8970 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-24 14:57:26 +00:00
Toshi MARUYAMA a261006666 scm: use to_s for revision in find_changeset_by_name method
On Rails 3.0.11, Subversion functional test fails.

<pre>
Error: test_directory_diff(RepositoriesSubversionControllerTest)
NoMethodError: undefined method `match' for 2:Fixnum
app/models/repository.rb:234:in `find_changeset_by_name'
</pre>

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8931 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-23 10:11:19 +00:00
Jean-Philippe Lang 8f92121606 Fixed that changesets parents associations are not deleted when deleting a repository.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8847 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-02-11 14:17:47 +00:00
Jean-Philippe Lang 34d1683087 Skip a bunch of useless "UPDATE repositories SET extra_info = ..." queries when navigating in repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8658 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-16 17:52:54 +00:00
Jean-Philippe Lang 83bb41d3a3 Display identifier for the default repository too (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-15 22:25:20 +00:00
Jean-Philippe Lang 1bd5e58c84 Adds support for multiple repositories per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8650 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-15 18:19:19 +00:00
Jean-Philippe Lang fb1a2fd7cd Resourcified repositories for CRUD operations to prepare for multiple SCM per project (#779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8648 e93f8b46-1217-0410-a6f0-8f06a7374b81
2012-01-15 14:23:06 +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 15795c4385 scm: model: add method to switch revision graph support or not and set default false (#5501)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-11-03 08:12:01 +00:00
Toshi MARUYAMA 93b838c3f7 scm: remove before_save() because of duplicate at url=(arg) and root_url=(arg).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6828 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-30 16:01:56 +00:00
Toshi MARUYAMA 38ba617f99 Rails3: replace deprecated 'validate_on_create' to declared validation method at Repository model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6717 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-08-29 05:48:11 +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 ee2236f5bd scm: catch all exceptions to get scm command version in repository model (#8510).
If scm command does not exist,
Linux jruby 1.6.2 (ruby-1.8.7-p330) raises java.io.IOException in production environment.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5999 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-06-03 09:54:57 +00:00
Toshi MARUYAMA fa94e86d43 scm: add exception of fetching revisions error in repository model (#5357, #2799, #4741, #8030).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5899 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-25 11:33:36 +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 4ee79a60ef scm: add a repository model method "merge_extra_info()" to merge "extra_info" serializing hash yaml (#7146, #7047).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5766 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-12 23:58:38 +00:00
Toshi MARUYAMA 30aecd5e25 scm: add "extra_info" column to repositories table and set serialize (#7146, #7047).
This column is for specific SCM.
Git 7 days problem (#7146) can not resolve unless storing branches info in database.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5762 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-12 17:29:18 +00:00
Toshi MARUYAMA fbdbdf96fe scm: code clean up repository model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5653 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 07:30:22 +00:00
Toshi MARUYAMA 86d9ea32db scm: code clean up repository model.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5647 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-05-05 01:30:24 +00:00
Toshi MARUYAMA bb929f4f75 scm: use i18n string at commit log encoding setting (#1735).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5519 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-04-23 03:34:43 +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 de5c337df2 scm: set supporting all revisions or not at scm level.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5143 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-16 00:49:50 +00:00
Toshi MARUYAMA 5f5dec16f2 scm: add feature of per project repository log encoding setting (#1735).
Subversion, Mercurial and Git supports UTF-8 log.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4982 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-03-01 10:27:30 +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
Jean-Philippe Lang a78d565959 Adds support for SCM/LDAP passwords encryption in the database (#7411).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4950 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-26 13:09:25 +00:00
Toshi MARUYAMA 9937ac677f scm: update adapter initialize() to use path encoding (#2664, #2274).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-24 05:58:59 +00:00
Toshi MARUYAMA a092f5e0b9 scm: catch exception of getting command and version in model (#4273).
If command does not exist, Windows raises exception in shellout().
Linux does not raise exception.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-19 01:11:48 +00:00
Toshi MARUYAMA 60d80653ba scm: catch CommandFailed during bulk Repository.fetch_changesets (#4455).
Contributed by Yuya Nishihara.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-02-15 02:12:19 +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 acb0d96617 scm: use #blank? instead of #nil? || #empty? at Repository#find_changeset_by_name(name) (#7307).
Referring r4711.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4712 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-14 22:51:12 +00:00
Toshi MARUYAMA 98b3a50657 scm: fix error on revision page for empty revision (#7307).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4703 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-13 12:04:30 +00:00
Toshi MARUYAMA ebb19c5863 scm: changing two revision diff text at SCM adapter level (#3724).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4698 e93f8b46-1217-0410-a6f0-8f06a7374b81
2011-01-11 16:04:07 +00:00
Jean-Philippe Lang 3d393a5711 Memorize commit authors to speed up changesets loading.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3472 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-21 14:42:45 +00:00
Jean-Philippe Lang d04d3f181a Fixed: Repository.fetch_changesets tries to fetch changesets for archived projects (#4782).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3402 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-02-09 18:42:42 +00:00
Jean-Philippe Lang 4e811bebd1 Fixes Repository#find_changeset_by_name with PostgreSQL (#3937).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2903 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-10-02 14:49:38 +00:00
Jean-Philippe Lang 30ad78e57d Fixed: RepositoriesController#revision may show wrong revision (#3779).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2898 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-09-20 15:20:22 +00:00
Jean-Philippe Lang e10577e9ed SCM:
* Fixes file log for non-Git repositories (Repository#latest_changesets ignores path argument)
* No longer used Repository#changesets_for_path method removed

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-08-17 16:32:24 +00:00
Jean-Philippe Lang 6fb80efdae Fixes argument in Repository#latest_changesets.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2842 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-08-17 14:12:51 +00:00
Eric Davis c28b044d68 Added branch and tag support to the git repository viewer. (#1406)
Many thanks to Adam Soltys and everyone else who tested this patch.

* Updated git test repository so it has a branch with some differences from the master branch
* Moved redmine diff class into a module so as not to clash with diff-lcs gem which is required by grit
* Find changesets from all branches, not just master
* Got revision browsing working
* Got file actions working properly
* Allow browsing by short form of commit identifier
* Added a method to retrieve repository branches
* Allow browsing by branch names as well as commit numbers
* Handle the case where a git repository has no master branch
* Expand revision box and handle finding revisions by first 8 characters
* Added branches dropdown to repository show page
* Combined repository browse and show into a single action.  Moved branch/revision navigation into a partial.
* Renamed partial navigation -> breadcrumbs
* Made it so latest revisions list uses branch and path context
* Preserve current path when changing branch or revision
* Perform slightly more graceful error handling in the case of invalid repository URLs
* Allow branch names to contain periods
* Allow dashes in branch names
* Sort branches by name
* Adding tags dropdown
* Need to disable both branches and tags dropdowns before submitting revision form
* Support underscores in revision (branch/tag) names
* Making file history sensitive to current branch/tag/revision, adding common navigation to changes page
* Updated translation files to include labels for 'branch', 'tag', and 'view all revisions'
* Reenable fields after submit so they don't look disabled and don't stay disabled on browser back button
* Instead of dashes just use empty string for default dropdown value
* Individual entry views now sport the upgraded revision navigation
* Don't display dropdowns with no entries
* Consider all revisions when doing initial load
* Fixed bug grabbing changesets.  Thanks to Bernhard Furtmueller for catching.
* Always check the entire log to find new revisions, rather than trying to go forward from the latest known one
* Added some cleverness to avoid selecting the whole changesets table any time someone views the repository root
* File copies and renames being detected properly
* Return gracefully if no revisions are found in the git log
* Applied patch from Babar Le Lapin to improve Windows compatibility

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2840 e93f8b46-1217-0410-a6f0-8f06a7374b81
2009-08-15 22:41:40 +00:00