Changeset 4458 for trunk/base


Ignore:
Timestamp:
Jan 5, 2004, 10:49:02 AM (20 years ago)
Author:
jkh
Message:

Add support for non-pserver anon cvs access. Thanks, Jay!
Submitted by: Jay Sachs <jay@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portfetch.tcl

    r4453 r4458  
    265265    global workpath cvs.password cvs.args cvs.post_args cvs.tag cvs.module cvs.cmd cvs.env
    266266    cd $workpath
    267     set cvs.args login
    268     set cvs.cmd "echo ${cvs.password} | /usr/bin/env ${cvs.env} cvs"
    269     # XXX cvs will request a password from the tty using getpass()
    270     # unless there is no controling terminal
    271     if {[catch {system -notty "[command cvs] 2>&1"} result]} {
    272         return -code error [msgcat::mc "CVS login failed"]
     267    if {[regexp ^:pserver: cvs.root]} {
     268        set cvs.args login
     269        set cvs.cmd "echo ${cvs.password} | /usr/bin/env ${cvs.env} cvs"
     270        # XXX cvs will request a password from the tty using getpass()
     271        # unless there is no controling terminal
     272        if {[catch {system -notty "[command cvs] 2>&1"} result]} {
     273            return -code error [msgcat::mc "CVS login failed"]
     274        }
     275    } else {
     276        set env(CVS_RSH) ssh
    273277    }
    274278    set cvs.args "co -r ${cvs.tag}"
     
    276280    set cvs.post_args "${cvs.module}"
    277281    if {[catch {system "[command cvs] 2>&1"} result]} {
    278         return -code error [msgcat::mc "CVS check out failed"]
     282        return -code error [msgcat::mc "CVS check out failed"]
    279283    }
    280284    return 0
Note: See TracChangeset for help on using the changeset viewer.