Defect #5923 ยป reposman.diff
reposman.rb (working copy) | ||
---|---|---|
245 | 245 | |
246 | 246 |
if File.directory?(repos_path) |
247 | 247 | |
248 |
# added by riceball to fix the exists local repository not sync to the empty scm configuration in redmine' db |
|
249 |
if $force == false and project.respond_to?(:repository) |
|
250 |
log("\trepository for project #{project.identifier} already exists in Redmine", :level => 1) |
|
251 |
next |
|
252 |
end |
|
253 |
if $svn_url |
|
254 |
begin |
|
255 |
project.post(:repository, :vendor => $scm, :repository => {:url => "#{$svn_url}#{project.identifier}"}, :key => $api_key) |
|
256 |
log("\trepository #{repos_path} registered in Redmine with url #{$svn_url}#{project.identifier}"); |
|
257 |
rescue => e |
|
258 |
log("\trepository #{repos_path} not registered in Redmine: #{e.message}"); |
|
259 |
end |
|
260 |
end |
|
261 | ||
248 | 262 |
# we must verify that repository has the good owner and the good |
249 | 263 |
# rights before leaving |
250 | 264 |
other_read = other_read_right?(repos_path) |
... | ... | |
307 | 321 |
end |
308 | 322 | |
309 | 323 |
end |
310 |
|
|
324 |
|