Ticket #45353: patch-src-port1_0-portfetch_tcl.diff
File patch-src-port1_0-portfetch_tcl.diff, 2.1 KB (added by anddam (Andrea D'Amore), 10 years ago) |
---|
-
src/port1.0/portfetch.tcl
424 424 425 425 # Perform a git fetch 426 426 proc portfetch::gitfetch {args} { 427 global work srcpath patchfiles \427 global workpath distname worksrcpath patchfiles \ 428 428 git.url git.branch git.sha1 git.cmd 429 429 430 set default_worksrcpath ${workpath}/${distname} 430 431 set options "-q" 431 432 if {${git.branch} eq ""} { 432 433 # if we're just using HEAD, we can make a shallow repo 433 434 set options "$options --depth=1" 434 435 } 435 set cmdstring "${git.cmd} clone $options ${git.url} ${ worksrcpath} 2>&1"436 set cmdstring "${git.cmd} clone $options ${git.url} ${default_worksrcpath} 2>&1" 436 437 ui_debug "Executing: $cmdstring" 437 438 if {[catch {system $cmdstring} result]} { 438 439 return -code error [msgcat::mc "Git clone failed"] … … 439 440 } 440 441 441 442 if {${git.branch} ne ""} { 442 set env "GIT_DIR=${ worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}"443 set env "GIT_DIR=${default_worksrcpath}/.git GIT_WORK_TREE=${default_worksrcpath}" 443 444 set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1" 444 445 ui_debug "Executing $cmdstring" 445 446 if {[catch {system $cmdstring} result]} { … … 456 457 457 458 # Perform a mercurial fetch. 458 459 proc portfetch::hgfetch {args} { 459 global worksrcpath prefix_frozen patchfiles hg.url hg.tag hg.cmd \ 460 global workpath distname worksrcpath prefix_frozen patchfiles \ 461 hg.url hg.tag hg.cmd hg.args \ 460 462 fetch.ignore_sslcert 461 463 464 set default_worksrcpath ${workpath}/${distname} 462 465 set insecureflag "" 463 466 if {${fetch.ignore_sslcert}} { 464 467 set insecureflag " --insecure" 465 468 } 466 469 467 set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} ${ worksrcpath} 2>&1"470 set cmdstring "${hg.cmd} clone${insecureflag} --rev \"${hg.tag}\" ${hg.url} ${default_worksrcpath} 2>&1" 468 471 ui_debug "Executing: $cmdstring" 469 472 if {[catch {system $cmdstring} result]} { 470 473 return -code error [msgcat::mc "Mercurial clone failed"]