bug when using apache authentication method

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1002 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Nicolas Chuche 2007-12-15 12:23:39 +00:00
parent ea35fff5bf
commit 1af9c47a27
1 changed files with 3 additions and 2 deletions

View File

@ -78,6 +78,7 @@ $quiet = false
$redmine_host = '' $redmine_host = ''
$repos_base = '' $repos_base = ''
$svn_owner = 'root' $svn_owner = 'root'
$use_groupid = true
$svn_url = false $svn_url = false
$test = false $test = false
@ -92,7 +93,7 @@ begin
case opt case opt
when '--svn-dir'; $repos_base = arg.dup when '--svn-dir'; $repos_base = arg.dup
when '--redmine-host'; $redmine_host = 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 '--url'; $svn_url = arg.dup
when '--verbose'; $verbose += 1 when '--verbose'; $verbose += 1
when '--test'; $test = true when '--test'; $test = true
@ -144,7 +145,7 @@ def set_owner_and_rights(project, repos_path, &block)
if RUBY_PLATFORM =~ /mswin/ if RUBY_PLATFORM =~ /mswin/
yield if block_given? yield if block_given?
else 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 right = project.is_public ? 0775 : 0770
yield if block_given? yield if block_given?
Find.find(repos_path) do |f| Find.find(repos_path) do |f|