Changeset 98109
- Timestamp:
- Sep 25, 2012, 7:57:51 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/base/src/port1.0/portfetch.tcl
r95616 r98109 338 338 } 339 339 340 # Given a URL to a Subversion repository, if the URL is http:// or 341 # https:// and MacPorts has been configured with a proxy for that URL 342 # type, then return command line options that should be passed to the 343 # svn command line client to enable use of that proxy. There are no 344 # proxies for Subversion's native protocol, identified by svn:// URLs. 345 proc portfetch::svn_proxy_args {url} { 346 global env 347 348 if { [string compare -length 7 {http://} ${url}] == 0 349 && [info exists env(http_proxy)]} { 350 set proxy_parts [split $env(http_proxy) :] 351 set proxy_host [lindex $proxy_parts 0] 352 set proxy_port [lindex $proxy_parts 1] 353 return "--config-option servers:global:http-proxy-host=${proxy_host} --config-option servers:global:http-proxy-port=${proxy_port}" 354 } elseif { [string compare -length 8 {https://} ${url}] == 0 355 && [info exists env(HTTPS_PROXY)]} { 356 set proxy_parts [split $env(HTTPS_PROXY) :] 357 set proxy_host [lindex $proxy_parts 0] 358 set proxy_port [lindex $proxy_parts 1] 359 return "--config-option servers:global:http-proxy-host=${proxy_host} --config-option servers:global:http-proxy-port=${proxy_port}" 360 } else { 361 return "" 362 } 363 } 364 340 365 # Perform an svn fetch 341 366 proc portfetch::svnfetch {args} { … … 349 374 append svn.url "@${svn.revision}" 350 375 } 351 set svn.args "${svn.method} ${svn.args} ${svn.url}" 376 377 set proxy_args [svn_proxy_args ${svn.url}] 378 379 set svn.args "${svn.method} ${svn.args} ${proxy_args} ${svn.url}" 352 380 353 381 if {[catch {command_exec svn "" "2>&1"} result]} {
Note: See TracChangeset
for help on using the changeset viewer.