summaryrefslogtreecommitdiffstats
path: root/extra/svn/reposman.rb
diff options
context:
space:
mode:
Diffstat (limited to 'extra/svn/reposman.rb')
-rwxr-xr-xextra/svn/reposman.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/extra/svn/reposman.rb b/extra/svn/reposman.rb
index 729970406..0b476cdc4 100755
--- a/extra/svn/reposman.rb
+++ b/extra/svn/reposman.rb
@@ -78,6 +78,7 @@ $quiet = false
$redmine_host = ''
$repos_base = ''
$svn_owner = 'root'
+$use_groupid = true
$svn_url = false
$test = false
@@ -92,7 +93,7 @@ begin
case opt
when '--svn-dir'; $repos_base = arg.dup
when '--redmine-host'; $redmine_host = arg.dup
- when '--owner'; $svn_owner = arg.dup
+ when '--owner'; $svn_owner = arg.dup; $use_groupid = false;
when '--url'; $svn_url = arg.dup
when '--verbose'; $verbose += 1
when '--test'; $test = true
@@ -144,7 +145,7 @@ def set_owner_and_rights(project, repos_path, &block)
if RUBY_PLATFORM =~ /mswin/
yield if block_given?
else
- uid, gid = Etc.getpwnam($svn_owner).uid, Etc.getgrnam(project.identifier).gid
+ uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : 0)
right = project.is_public ? 0775 : 0770
yield if block_given?
Find.find(repos_path) do |f|