Revision 442:753f1380d6bc extra/svn
| extra/svn/.svn/all-wcprops | ||
|---|---|---|
| 1 | 1 |
K 25 |
| 2 | 2 |
svn:wc:ra_dav:version-url |
| 3 |
V 34
|
|
| 4 |
/svn/!svn/ver/4936/trunk/extra/svn
|
|
| 3 |
V 48
|
|
| 4 |
/svn/!svn/ver/5878/branches/1.2-stable/extra/svn
|
|
| 5 | 5 |
END |
| 6 |
reposman.rb |
|
| 7 |
K 25 |
|
| 8 |
svn:wc:ra_dav:version-url |
|
| 9 |
V 46 |
|
| 10 |
/svn/!svn/ver/4288/trunk/extra/svn/reposman.rb |
|
| 11 |
END |
|
| 12 |
svnserve.wrapper |
|
| 13 |
K 25 |
|
| 14 |
svn:wc:ra_dav:version-url |
|
| 15 |
V 50 |
|
| 16 |
/svn/!svn/ver/402/trunk/extra/svn/svnserve.wrapper |
|
| 17 |
END |
|
| 18 |
Redmine.pm |
|
| 19 |
K 25 |
|
| 20 |
svn:wc:ra_dav:version-url |
|
| 21 |
V 45 |
|
| 22 |
/svn/!svn/ver/4936/trunk/extra/svn/Redmine.pm |
|
| 23 |
END |
|
| 24 |
create_views.sql |
|
| 25 |
K 25 |
|
| 26 |
svn:wc:ra_dav:version-url |
|
| 27 |
V 50 |
|
| 28 |
/svn/!svn/ver/396/trunk/extra/svn/create_views.sql |
|
| 29 |
END |
|
| extra/svn/.svn/entries | ||
|---|---|---|
| 1 | 1 |
10 |
| 2 | 2 |
|
| 3 | 3 |
dir |
| 4 |
4993
|
|
| 5 |
http://redmine.rubyforge.org/svn/trunk/extra/svn
|
|
| 4 |
6000
|
|
| 5 |
http://redmine.rubyforge.org/svn/branches/1.2-stable/extra/svn
|
|
| 6 | 6 |
http://redmine.rubyforge.org/svn |
| 7 | 7 |
|
| 8 | 8 |
|
| 9 | 9 |
|
| 10 |
2011-02-23T17:27:31.762248Z
|
|
| 11 |
4936
|
|
| 12 |
jplang
|
|
| 10 |
2011-05-17T13:32:08.404109Z
|
|
| 11 |
5825
|
|
| 12 |
tmaruyama
|
|
| 13 | 13 |
|
| 14 | 14 |
|
| 15 | 15 |
|
| ... | ... | |
| 32 | 32 |
|
| 33 | 33 |
|
| 34 | 34 |
|
| 35 |
2011-03-03T11:05:12.000000Z
|
|
| 36 |
a0d169b0fc20459335e531e4f3921ede
|
|
| 37 |
2010-10-24T21:00:05.611798Z
|
|
| 38 |
4288
|
|
| 39 |
jplang
|
|
| 35 |
2011-06-06T13:18:33.000000Z
|
|
| 36 |
b9371e264b5907bf884bf17deba8c835
|
|
| 37 |
2011-05-17T13:32:08.404109Z
|
|
| 38 |
5825
|
|
| 39 |
tmaruyama
|
|
| 40 | 40 |
has-props |
| 41 | 41 |
|
| 42 | 42 |
|
| ... | ... | |
| 58 | 58 |
|
| 59 | 59 |
|
| 60 | 60 |
|
| 61 |
10545
|
|
| 61 |
10512
|
|
| 62 | 62 |
|
| 63 | 63 |
svnserve.wrapper |
| 64 | 64 |
file |
| ... | ... | |
| 66 | 66 |
|
| 67 | 67 |
|
| 68 | 68 |
|
| 69 |
2011-03-03T11:05:12.000000Z
|
|
| 69 |
2011-06-06T13:15:00.000000Z
|
|
| 70 | 70 |
f41d78e45e03554626edf5e4e6663d80 |
| 71 | 71 |
2007-04-02T19:01:31.084001Z |
| 72 | 72 |
402 |
| ... | ... | |
| 100 | 100 |
|
| 101 | 101 |
|
| 102 | 102 |
|
| 103 |
2011-03-03T11:40:18.000000Z
|
|
| 103 |
2011-06-06T13:15:00.000000Z
|
|
| 104 | 104 |
c3d331d6024a3d0f0c250fda387ce052 |
| 105 | 105 |
2011-02-23T17:27:31.762248Z |
| 106 | 106 |
4936 |
| ... | ... | |
| 134 | 134 |
|
| 135 | 135 |
|
| 136 | 136 |
|
| 137 |
2011-03-03T11:05:12.000000Z
|
|
| 137 |
2011-06-06T13:15:00.000000Z
|
|
| 138 | 138 |
96fdfe0a7a4913dbbfc1b871d7abab02 |
| 139 | 139 |
2007-04-01T19:43:59.029417Z |
| 140 | 140 |
396 |
| extra/svn/.svn/text-base/reposman.rb.svn-base | ||
|---|---|---|
| 7 | 7 |
# == Usage |
| 8 | 8 |
# |
| 9 | 9 |
# reposman [OPTIONS...] -s [DIR] -r [HOST] |
| 10 |
#
|
|
| 10 |
# |
|
| 11 | 11 |
# Examples: |
| 12 | 12 |
# reposman --svn-dir=/var/svn --redmine-host=redmine.example.net --scm subversion |
| 13 | 13 |
# reposman -s /var/git -r redmine.example.net -u http://svn.example.net --scm git |
| ... | ... | |
| 57 | 57 |
# -q, --quiet no log |
| 58 | 58 |
# |
| 59 | 59 |
# == References |
| 60 |
#
|
|
| 60 |
# |
|
| 61 | 61 |
# You can find more information on the redmine's wiki : http://www.redmine.org/wiki/redmine/HowTos |
| 62 | 62 |
|
| 63 | 63 |
|
| ... | ... | |
| 205 | 205 |
log("retrieved #{projects.size} projects", :level => 1)
|
| 206 | 206 |
|
| 207 | 207 |
def set_owner_and_rights(project, repos_path, &block) |
| 208 |
if RUBY_PLATFORM =~ /mswin/
|
|
| 208 |
if mswin?
|
|
| 209 | 209 |
yield if block_given? |
| 210 | 210 |
else |
| 211 | 211 |
uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : Etc.getgrnam($svn_group).gid) |
| ... | ... | |
| 225 | 225 |
def owner_name(file) |
| 226 | 226 |
mswin? ? |
| 227 | 227 |
$svn_owner : |
| 228 |
Etc.getpwuid( File.stat(file).uid ).name
|
|
| 228 |
Etc.getpwuid( File.stat(file).uid ).name |
|
| 229 | 229 |
end |
| 230 |
|
|
| 230 |
|
|
| 231 | 231 |
def mswin? |
| 232 | 232 |
(RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i) |
| 233 | 233 |
end |
| ... | ... | |
| 246 | 246 |
repos_path = File.join($repos_base, project.identifier).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) |
| 247 | 247 |
|
| 248 | 248 |
if File.directory?(repos_path) |
| 249 |
|
|
| 250 | 249 |
# we must verify that repository has the good owner and the good |
| 251 | 250 |
# rights before leaving |
| 252 | 251 |
other_read = other_read_right?(repos_path) |
| ... | ... | |
| 304 | 303 |
log("\trepository #{repos_path} not registered in Redmine: #{e.message}");
|
| 305 | 304 |
end |
| 306 | 305 |
end |
| 307 |
|
|
| 308 | 306 |
log("\trepository #{repos_path} created");
|
| 309 | 307 |
end |
| 310 |
|
|
| 311 | 308 |
end |
| 312 |
|
|
| extra/svn/reposman.rb | ||
|---|---|---|
| 7 | 7 |
# == Usage |
| 8 | 8 |
# |
| 9 | 9 |
# reposman [OPTIONS...] -s [DIR] -r [HOST] |
| 10 |
#
|
|
| 10 |
# |
|
| 11 | 11 |
# Examples: |
| 12 | 12 |
# reposman --svn-dir=/var/svn --redmine-host=redmine.example.net --scm subversion |
| 13 | 13 |
# reposman -s /var/git -r redmine.example.net -u http://svn.example.net --scm git |
| ... | ... | |
| 59 | 59 |
# -q, --quiet no log |
| 60 | 60 |
# |
| 61 | 61 |
# == References |
| 62 |
#
|
|
| 62 |
# |
|
| 63 | 63 |
# You can find more information on the redmine's wiki : http://www.redmine.org/wiki/redmine/HowTos |
| 64 | 64 |
|
| 65 | 65 |
|
| ... | ... | |
| 215 | 215 |
log("retrieved #{projects.size} projects", :level => 1)
|
| 216 | 216 |
|
| 217 | 217 |
def set_owner_and_rights(project, repos_path, &block) |
| 218 |
if RUBY_PLATFORM =~ /mswin/
|
|
| 218 |
if mswin?
|
|
| 219 | 219 |
yield if block_given? |
| 220 | 220 |
else |
| 221 | 221 |
uid, gid = Etc.getpwnam($svn_owner).uid, ($use_groupid ? Etc.getgrnam(project.identifier).gid : Etc.getgrnam($svn_group).gid) |
| ... | ... | |
| 235 | 235 |
def owner_name(file) |
| 236 | 236 |
mswin? ? |
| 237 | 237 |
$svn_owner : |
| 238 |
Etc.getpwuid( File.stat(file).uid ).name
|
|
| 238 |
Etc.getpwuid( File.stat(file).uid ).name |
|
| 239 | 239 |
end |
| 240 |
|
|
| 240 |
|
|
| 241 | 241 |
def mswin? |
| 242 | 242 |
(RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i) |
| 243 | 243 |
end |
| ... | ... | |
| 256 | 256 |
repos_path = File.join($repos_base, project.identifier).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR) |
| 257 | 257 |
|
| 258 | 258 |
if File.directory?(repos_path) |
| 259 |
|
|
| 260 | 259 |
# we must verify that repository has the good owner and the good |
| 261 | 260 |
# rights before leaving |
| 262 | 261 |
other_read = other_read_right?(repos_path) |
| ... | ... | |
| 314 | 313 |
log("\trepository #{repos_path} not registered in Redmine: #{e.message}");
|
| 315 | 314 |
end |
| 316 | 315 |
end |
| 317 |
|
|
| 318 | 316 |
log("\trepository #{repos_path} created");
|
| 319 | 317 |
end |
| 318 |
end |
|
| 320 | 319 |
|
| 321 |
end |
|
| 322 |
|
|
Also available in: Unified diff