Changeset 1576


Ignore:
Timestamp:
May 23, 2012, 1:29:16 PM (7 years ago)
Author:
bruno
Message:

Add support of the PBVCSOPT environment variable to pass options to the VCS command such as a login/passwd authentication (useful for pbtest)

Location:
devel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r1560 r1576  
    520520my $scheme = shift;
    521521my $cmd = "";
     522my $cmdopt = "";
    522523
    523524# If there is a socks proxy to use
     
    528529}
    529530
     531if (defined $ENV{'PBVCSOPT'}) {
     532    $cmdopt .= $ENV{'PBVCSOPT'};
     533}
     534
    530535if ($scheme =~ /hg/) {
    531     return($cmd."hg")
     536    return($cmd."hg ".$cmdopt)
    532537} elsif ($scheme =~ /git/) {
    533     return($cmd."git")
     538    return($cmd."git ".$cmdopt)
    534539} elsif ($scheme =~ /svn/) {
    535     return($cmd."svn")
     540    return($cmd."svn ".$cmdopt)
    536541} elsif ($scheme =~ /svk/) {
    537     return($cmd."svk")
     542    return($cmd."svk ".$cmdopt)
    538543} elsif ($scheme =~ /cvs/) {
    539     return($cmd."cvs")
     544    return($cmd."cvs ".$cmdopt)
    540545} elsif (($scheme =~ /http/) || ($scheme =~ /ftp/)) {
    541546    my $command = pb_check_req("wget",1);
  • devel/pb/t/pbtest

    r1575 r1576  
    122122sudo su - pbtest -c "cd pb ; svn co svn://localhost/pb ."
    123123sudo su - pbtest -c "cd pb ; touch README ; svn add README ; svn ci --username pbtest --password pbtest -m 'add readme' README"
    124 sudo su - pbtest -c "pb -p afio newproj afio"
     124sudo su - pbtest -c "export PBVCSOPT='--username pbtest --password pbtest' ; pb -p afio newproj afio"
    125125cat >> /tmp/afio.pb << EOF
    126126defpkgdir afio = dummy
Note: See TracChangeset for help on using the changeset viewer.