Revision 1336:b61a51fb42b9

View differences:

extra/soundsoftware/convert-external-repos.rb
34 34

  
35 35

  
36 36
require 'getoptlong'
37
require 'rdoc/usage'
38 37
require 'find'
39 38
require 'etc'
40 39

  
......
86 85
    when '--verbose';        $verbose += 1
87 86
    when '--test';           $test = true
88 87
    when '--version';        puts Version; exit
89
    when '--help';           RDoc::usage
88
    when '--help';           puts "Read source for documentation"; exit 
90 89
    when '--quiet';          $quiet = true
91 90
    end
92 91
  end
......
99 98
end
100 99

  
101 100
if ($redmine_host.empty? or $repos_base.empty? or $command.empty?)
102
  RDoc::usage
101
  puts "Read source for documentation"; exit
103 102
end
104 103

  
105 104
unless File.directory?($repos_base)
......
114 113

  
115 114
class Project < ActiveResource::Base
116 115
  self.headers["User-agent"] = "SoundSoftware external repository converter/#{Version}"
116
  self.format = :xml
117 117
end
118 118

  
119 119
log("querying Redmine for projects...", :level => 1);
......
128 128
begin
129 129
  # Get all active projects that have the Repository module enabled
130 130
  projects = Project.find(:all, :params => {:key => $api_key})
131
rescue ActiveResource::ForbiddenAccess
132
  log("Request was denied by your Redmine server. Make sure that 'WS for repository management' is enabled in application settings and that you provided the correct API key.")
131 133
rescue => e
132 134
  log("Unable to connect to #{Project.site}: #{e}", :exit => true)
133 135
end
extra/soundsoftware/update-external-repo.sh
1 1
#!/bin/sh
2 2

  
3 3
mirrordir="/var/mirror"
4
hg="/usr/local/bin/hg"
4
hg="/usr/bin/hg"
5 5

  
6 6
project="$1"
7 7
local_repo="$2"

Also available in: Unified diff