HowTo configure Redmine for advanced Mercurial integration » redmine.patch
app/controllers/projects_controller.rb (working copy) | ||
---|---|---|
74 | 74 |
@project.enabled_module_names = Redmine::AccessControl.available_project_modules |
75 | 75 |
else |
76 | 76 |
@project.enabled_module_names = params[:enabled_modules] |
77 |
r = Repository.factory("Mercurial",:root_url => "/home/redmineusers/projects/#{@project.identifier}", |
|
78 |
:url => "/home/redmineusers/projects/#{@project.identifier}") |
|
79 |
@project.repository = r |
|
80 |
g = Group.new({ "lastname" => @project.identifier} ) #blidly create a new accompanying group |
|
81 |
gr = Role.givable.find_by_name("Developer") |
|
82 |
gm = Member.new(:principal => g, :roles => [gr], :project => @project) |
|
83 |
@project.members << gm |
|
77 | 84 |
if @project.save |
78 | 85 |
@project.set_parent!(params[:project]['parent_id']) if User.current.admin? && params[:project].has_key?('parent_id') |
79 | 86 |
# Add current user as a project member if he is not admin |
... | ... | |
82 | 89 |
m = Member.new(:user => User.current, :roles => [r]) |
83 | 90 |
@project.members << m |
84 | 91 |
end |
92 |
if g.save |
|
93 |
`sudo /usr/local/bin/createrepo "#{@project.identifier}"` |
|
94 |
puts "Success? : #{$?}" |
|
95 |
end |
|
85 | 96 |
flash[:notice] = l(:notice_successful_create) |
86 | 97 |
redirect_to :controller => 'projects', :action => 'settings', :id => @project |
87 | 98 |
end |
88 | 99 |
end |
100 |
|
|
101 |
|
|
89 | 102 |
end |
90 | 103 |
|
91 | 104 |
def copy |
extra/svn/create_views.sql (working copy) | ||
---|---|---|
13 | 13 |
from projects; |
14 | 14 | |
15 | 15 |
CREATE OR REPLACE VIEW nss_users AS |
16 |
select login AS username, CONCAT_WS(' ', firstname, lastname) as realname, (id + 5000) AS uid, 'x' AS password |
|
16 |
select login AS username, CONCAT_WS(' ', firstname, lastname) as realname, (id + 5000) AS uid, 'x' AS password,
|
|
17 | 17 |
from users |
18 | 18 |
where status = 1; |
19 | 19 |
- « Previous
- 1
- 2
- Next »