Ticket #29093: portfetch.tcl.diff

File portfetch.tcl.diff, 1.7 KB (added by ci42, 13 years ago)

suggested patch

  • portfetch.tcl

    old new  
    369369
    370370# Perform a git fetch
    371371proc portfetch::gitfetch {args} {
    372     global worksrcpath
     372    global workpath distname
    373373    global git.url git.branch git.sha1 git.cmd
    374374
     375    set srcpath ${workpath}/${distname}
    375376    set options "-q"
    376377    if {[string length ${git.branch}] == 0} {
    377378        # if we're just using HEAD, we can make a shallow repo
    378379        set options "$options --depth=1"
    379380    }
    380     set cmdstring "${git.cmd} clone $options ${git.url} ${worksrcpath} 2>&1"
     381    set cmdstring "${git.cmd} clone $options ${git.url} ${srcpath} 2>&1"
    381382    ui_debug "Executing: $cmdstring"
    382383    if {[catch {system $cmdstring} result]} {
    383384        return -code error [msgcat::mc "Git clone failed"]
    384385    }
    385386
    386387    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}"
    388389        set cmdstring "$env ${git.cmd} checkout -q ${git.branch} 2>&1"
    389390        ui_debug "Executing $cmdstring"
    390391        if {[catch {system $cmdstring} result]} {
     
    401402
    402403# Perform a mercurial fetch.
    403404proc portfetch::hgfetch {args} {
    404     global worksrcpath prefix_frozen
     405    global workpath distname prefix_frozen
    405406    global hg.url hg.tag hg.cmd
    406407
    407     set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${worksrcpath} 2>&1"
     408    set cmdstring "${hg.cmd} clone --rev ${hg.tag} ${hg.url} ${workpath}/${distname} 2>&1"
    408409    ui_debug "Executing: $cmdstring"
    409410    if {[catch {system $cmdstring} result]} {
    410411        return -code error [msgcat::mc "Mercurial clone failed"]