* reposman can now use an external command with "-c" to create repository of other kind than svn

* WS used by reposman only return projects with repository module enable (so reposman no longer create repository if module is disable)
* it doesn't create repository if repository definition already exists in redmine database (unless -f is used)

git-svn-id: http://redmine.rubyforge.org/svn/branches/nbc@1793 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Nicolas Chuche
2008-09-08 17:42:15 +00:00
parent 562d3aa6a6
commit 2bda4e4c11
4 changed files with 37 additions and 6 deletions
+10 -2
View File
@@ -15,10 +15,18 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class AWSProjectWithRepository < ActionWebService::Struct
member :id, :int
member :identifier, :string
member :name, :string
member :is_public, :bool
member :repository, Repository
end
class SysApi < ActionWebService::API::Base
api_method :projects,
api_method :projects_with_repository_enabled,
:expects => [],
:returns => [[Project]]
:returns => [[AWSProjectWithRepository]]
api_method :repository_created,
:expects => [:string, :string],
:returns => [:int]
+2 -2
View File
@@ -23,8 +23,8 @@ class SysController < ActionController::Base
before_invocation :check_enabled
# Returns the projects list, with their repositories
def projects
Project.find(:all, :include => :repository)
def projects_with_repository_enabled
Project.repository_enabled(:all, :include => :repository)
end
# Registers a repository for the given project identifier
+2
View File
@@ -62,6 +62,8 @@ class Project < ActiveRecord::Base
validates_format_of :identifier, :with => /^[a-z0-9\-]*$/
before_destroy :delete_all_members
named_scope :repository_enabled, { :include => :enabled_modules, :conditions => ['enabled_modules.name=?', 'repository'] }
def identifier=(identifier)
super unless identifier_frozen?