プロジェクト

全般

プロフィール

Vote #70788

未完了

invert project <-> repository relationship

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
-
開始日:
2011/09/30
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
9359
author_id:
40856
assigned_to_id:
0
comments:
14
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

This patch changes the relationship between repositories and projects, so that a single repository can be shared among multiple projects.

While you can already use the same physical repository with multiple projects without this patch, doing so leads to duplication of change records in the database as well as multiple identical changeset references on issues, because each changeset is imported n times, where n is the number of projects referencing the repository.

The patch changes Redmine's behavior to re-use an already existing repository record if possible, when the scm properties of a project are configured. A migration converting existing installations that use one ore more repositories in multiple projects to the new setup is included.


journals

--------------------------------------------------------------------------------
relates to issue #6857
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Also related to #9703.
--------------------------------------------------------------------------------
Thank you Jens,

I have found this patch invaluable and have updated the patch against redmine-1.3-stable r9308 for convenience.

...Robert

--------------------------------------------------------------------------------

关联到 Feature #779: Multiple SCM per project
--------------------------------------------------------------------------------
I don't understand your comment ;-)

however this patch is *not* about multiple SCM per project but about multiple projects per SCM - so you can reference the same repository in multiple projects, i.e. one for development and one for exception tracking via the hoptoad_notifier-plugin.
--------------------------------------------------------------------------------
@robert - very appreciated - think I'll need to upgrade that Redmine setup to 1.3 or even 1.4 soon...
--------------------------------------------------------------------------------
Hi!

I've applied this patch (invert_project_repository_relationship_2-1.3-stable-9308.patch) and get the 500 error.
In log:
<pre>
[redmine log]# tail -15 production.log
EnabledModule Load (0.1ms) SELECT name FROM `enabled_modules` WHERE (`enabled_modules`.project_id = 76)
Project Load (0.0ms) Mysql::Error: Unknown column 'projects.repository_id' in 'where clause': SELECT `projects`.id FROM `projects` WHERE (`projects`.`id` = 76) AND (`projects`.repository_id = NULL) LIMIT 1

ActiveRecord::StatementInvalid (Mysql::Error: Unknown column 'projects.repository_id' in 'where clause': SELECT `projects`.id FROM `projects` WHERE (`projects`.`id` = 76) AND (`projects`.repository_id = NULL) LIMIT 1):
app/controllers/repositories_controller.rb:41:in `edit'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'

</pre>

Redmine version is 1.3.2
--------------------------------------------------------------------------------
Anyone taken a stab at getting this working under 2.2.x yet?
--------------------------------------------------------------------------------
Roman Lukmanov wrote:
> Hi!
>
> I've applied this patch (invert_project_repository_relationship_2-1.3-stable-9308.patch) and get the 500 error.
> In log:
> [...]
>
> Redmine version is 1.3.2

Hi Roman,

Did you apply the patch against checked out Redmine 1.3 svn revision 9308? If your checked out source is too far away from this revision I can not predict the behavior. Better to study the patch and manually patch if not a direct match.
--------------------------------------------------------------------------------
Greetings All,

I have just evaluated latest Redmine 2.3 stable and the old implementation has not changed. I might just take a shot at re-creating the patch. I am a little concerned about the added complexity of multiple SCM support per project.

... Robert
--------------------------------------------------------------------------------
Charles Sporkman wrote:
> Anyone taken a stab at getting this working under 2.2.x yet?
Hi Chris,
Thinking about having a go on the current 2.3 stable build unless you have already done it. ;-)
... Robert

--------------------------------------------------------------------------------
My initial simple attempt at creating a Redmine 2.3 patch using Jens original code highlights the new complexity added by Redmine's recently added new multiple SCM per project capability. My up-ported patch simply patches the original code but does not correctly integrate into the new Redmine functionality

For my application I can live with the current 2.3 SCM structure however I still hate the fact that adding the same SCM to a new project takes a long time for large repositories to unnecessarily build the change-set over again.

I may still tackle this properly in the future if I really need it. In the mean time if anyone wants my non-functional 2.3 patch to play with then please ask.

... Robert Rath
--------------------------------------------------------------------------------


related_issues

relates,Closed,3169,Multiple repositories for projects
relates,New,6857,git references leaking from subproject to project
relates,New,9703,Define repositories independently from projects

Admin Redmine さんが約2年前に更新

  • カテゴリSCM_3 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0