Project

General

Profile

Patch #6107 » reposmanPath.diff

José Cano, 2010-08-11 18:40

View differences:

extra/svn/reposman.rb (working copy)
114 114
    def self.create(path)
115 115
      system_or_raise "svnadmin create #{path}"
116 116
    end
117
    def self.delete(path)
118
      system_or_raise "rm -rf #{path}"
119
    end	
117 120
  end
118 121

  
119 122
  module Git
......
124 127
        system_or_raise "git update-server-info"
125 128
      end
126 129
    end
130
    def self.delete(path)
131
	log("delete git projects must be implemented")	
132
    end
127 133
  end
128 134

  
129 135
end
......
230 236
  (RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i)
231 237
end
232 238

  
239
Dir.chdir($repos_base)
240
subdir_list=Dir["*"].reject{|o| not File.directory?(o)}
241
subdir_list.each do |dir|
242
	if projects.select { |p| p.identifier.eql?(dir) }.size == 0
243
	        repos_path = File.join($repos_base, dir).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
244
		log( "project not found: #{dir.to_s} -> repos_path: #{repos_path}" )
245
	        if scm_module.nil?
246
			log('scm_module is nil')
247
		else
248
			scm_module.delete(repos_path)
249
			log("deleted repository: #{repos_path}")
250
		end
251
	end
252
end
253

  
254

  
233 255
projects.each do |project|
234 256
  log("treating project #{project.name}", :level => 1)
235 257

  
......
307 329
  end
308 330

  
309 331
end
310
  
    (1-1/1)