Ticket #29093: portfetch.tcl.diff
File portfetch.tcl.diff, 1.7 KB (added by ci42, 14 years ago) |
---|
-
portfetch.tcl
old new 369 369 370 370 # Perform a git fetch 371 371 proc portfetch::gitfetch {args} { 372 global work srcpath372 global workpath distname 373 373 global git.url git.branch git.sha1 git.cmd 374 374 375 set srcpath ${workpath}/${distname} 375 376 set options "-q" 376 377 if {[string length ${git.branch}] == 0} { 377 378 # if we're just using HEAD, we can make a shallow repo 378 379 set options "$options --depth=1" 379 380 } 380 set cmdstring "${git.cmd} clone $options ${git.url} ${ worksrcpath} 2>&1"381 set cmdstring "${git.cmd} clone $options ${git.url} ${srcpath} 2>&1" 381 382 ui_debug "Executing: $cmdstring" 382 383 if {[catch {system $cmdstring} result]} { 383 384 return -code error [msgcat::mc "Git clone failed"] 384 385 } 385 386 386 387 if {[string length ${git.branch}] > 0} { 387 set env "GIT_DIR=${ worksrcpath}/.git GIT_WORK_TREE=${worksrcpath}"388 set env "GIT_DIR=${srcpath}/.git GIT_WORK_TREE=${srcpath}" 388 389 set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1" 389 390 ui_debug "Executing $cmdstring" 390 391 if {[catch {system $cmdstring} result]} { … … 401 402 402 403 # Perform a mercurial fetch. 403 404 proc portfetch::hgfetch {args} { 404 global work srcpathprefix_frozen405 global workpath distname prefix_frozen 405 406 global hg.url hg.tag hg.cmd 406 407 407 set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${work srcpath} 2>&1"408 set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${workpath}/${distname} 2>&1" 408 409 ui_debug "Executing: $cmdstring" 409 410 if {[catch {system $cmdstring} result]} { 410 411 return -code error [msgcat::mc "Mercurial clone failed"]