Mercurial > hg > soundsoftware-site
diff extra/svn/reposman.rb @ 511:107d36338b70 live
Merge from branch "cannam"
author | Chris Cannam |
---|---|
date | Thu, 14 Jul 2011 10:43:07 +0100 |
parents | 753f1380d6bc |
children | 5e80956cc792 |
line wrap: on
line diff
--- a/extra/svn/reposman.rb Thu Jun 09 16:51:06 2011 +0100 +++ b/extra/svn/reposman.rb Thu Jul 14 10:43:07 2011 +0100 @@ -7,7 +7,7 @@ # == Usage # # reposman [OPTIONS...] -s [DIR] -r [HOST] -# +# # Examples: # reposman --svn-dir=/var/svn --redmine-host=redmine.example.net --scm subversion # reposman -s /var/git -r redmine.example.net -u http://svn.example.net --scm git @@ -59,7 +59,7 @@ # -q, --quiet no log # # == References -# +# # You can find more information on the redmine's wiki : http://www.redmine.org/wiki/redmine/HowTos @@ -215,7 +215,7 @@ log("retrieved #{projects.size} projects", :level => 1) def set_owner_and_rights(project, repos_path, &block) - if RUBY_PLATFORM =~ /mswin/ + if mswin? yield if block_given? else uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : Etc.getgrnam($svn_group).gid) @@ -235,9 +235,9 @@ def owner_name(file) mswin? ? $svn_owner : - Etc.getpwuid( File.stat(file).uid ).name + Etc.getpwuid( File.stat(file).uid ).name end - + def mswin? (RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i) end @@ -256,7 +256,6 @@ repos_path = File.join($repos_base, project.identifier).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) if File.directory?(repos_path) - # we must verify that repository has the good owner and the good # rights before leaving other_read = other_read_right?(repos_path) @@ -314,9 +313,7 @@ log("\trepository #{repos_path} not registered in Redmine: #{e.message}"); end end - log("\trepository #{repos_path} created"); end +end -end -