Defect #5923
closedreposman.rb do not sync the repository to the redmine's database
0%
Description
reposman.rb do not sync the repository to the redmine's database, the SCM configuration in DB is empty.
bug fixed:
(246L)
if File.directory?(repos_path)
#added by riceball
if $force == false and project.respond_to?(:repository)
log("\trepository for project #{project.identifier} already exists in Redmine", :level => 1)
next
end
if $svn_url
begin
project.post(:repository, :vendor => $scm, :repository => {:url => "#{$svn_url}#{project.identifier}"}, :key => $api_key)
log("\trepository #{repos_path} registered in Redmine with url #{$svn_url}#{project.identifier}");
rescue => e
log("\trepository #{repos_path} not registered in Redmine: #{e.message}");
end
end
Files
Updated by Felix Schäfer over 14 years ago
I'm not sure I understand what problem you had and what your fix does. Could you please attach a diff of your file to the original file?
Updated by Riceball LEE over 14 years ago
- File reposman.diff reposman.diff added
fix the exists local repository not sync to the empty scm configuration in redmine' db.
ok here r the diff.
Updated by Felix Schäfer over 14 years ago
- Status changed from New to Closed
- Resolution set to Wont fix
Reposman's scope is only to create repositories for projects which don't have one yet, not to write the configuration for existing ones.
(and as an aside, your patch only tests for the existence of the directory, not if it actually is an svn directory, or maybe a git repository, and so on)