@@ -26,6 +26,7 | |||
|
26 | 26 | # allow user to browse the repository within |
|
27 | 27 | # Redmine even for private project. If you want to share repositories |
|
28 | 28 | # through Redmine.pm, you need to use the apache owner. |
|
29 | # -g, --group=GROUP group of the repository. (default: root) | |
|
29 | 30 | # --scm=SCM the kind of SCM repository you want to create (and register) in |
|
30 | 31 | # Redmine (default: Subversion). reposman is able to create Git |
|
31 | 32 | # and Subversion repositories. For all other kind (Bazaar, |
@@ -60,13 +61,14 require 'rdoc/usage' | |||
|
60 | 61 | require 'find' |
|
61 | 62 | require 'etc' |
|
62 | 63 | |
|
63 |
Version = "1. |
|
|
64 | Version = "1.3" | |
|
64 | 65 | SUPPORTED_SCM = %w( Subversion Darcs Mercurial Bazaar Git Filesystem ) |
|
65 | 66 | |
|
66 | 67 | opts = GetoptLong.new( |
|
67 | 68 | ['--svn-dir', '-s', GetoptLong::REQUIRED_ARGUMENT], |
|
68 | 69 | ['--redmine-host', '-r', GetoptLong::REQUIRED_ARGUMENT], |
|
69 | 70 | ['--owner', '-o', GetoptLong::REQUIRED_ARGUMENT], |
|
71 | ['--group', '-g', GetoptLong::REQUIRED_ARGUMENT], | |
|
70 | 72 | ['--url', '-u', GetoptLong::REQUIRED_ARGUMENT], |
|
71 | 73 | ['--command' , '-c', GetoptLong::REQUIRED_ARGUMENT], |
|
72 | 74 | ['--scm', GetoptLong::REQUIRED_ARGUMENT], |
@@ -83,6 +85,7 $quiet = false | |||
|
83 | 85 | $redmine_host = '' |
|
84 | 86 | $repos_base = '' |
|
85 | 87 | $svn_owner = 'root' |
|
88 | $svn_group = 'root' | |
|
86 | 89 | $use_groupid = true |
|
87 | 90 | $svn_url = false |
|
88 | 91 | $test = false |
@@ -125,6 +128,7 begin | |||
|
125 | 128 | when '--svn-dir'; $repos_base = arg.dup |
|
126 | 129 | when '--redmine-host'; $redmine_host = arg.dup |
|
127 | 130 | when '--owner'; $svn_owner = arg.dup; $use_groupid = false; |
|
131 | when '--group'; $svn_group = arg.dup; $use_groupid = false; | |
|
128 | 132 | when '--url'; $svn_url = arg.dup |
|
129 | 133 | when '--scm'; $scm = arg.dup.capitalize; log("Invalid SCM: #{$scm}", :exit => true) unless SUPPORTED_SCM.include?($scm) |
|
130 | 134 | when '--command'; $command = arg.dup |
@@ -195,7 +199,7 def set_owner_and_rights(project, repos_path, &block) | |||
|
195 | 199 | if RUBY_PLATFORM =~ /mswin/ |
|
196 | 200 | yield if block_given? |
|
197 | 201 | else |
|
198 |
uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : |
|
|
202 | uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : Etc.getgrnam($svn_group).gid) | |
|
199 | 203 | right = project.is_public ? 0775 : 0770 |
|
200 | 204 | yield if block_given? |
|
201 | 205 | Find.find(repos_path) do |f| |
General Comments 0
You need to be logged in to leave comments.
Login now