Changeset 2202 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder


Ignore:
Timestamp:
Mar 10, 2017, 4:23:34 PM (7 years ago)
Author:
Bruno Cornec
Message:

Fix a bug with git+http when doing export, where the worng block was executed first due to the way checks are made ( vs no )

File:
1 edited

Legend:

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

    r2169 r2202  
    88# $Id$
    99#
    10 # Copyright B. Cornec 2007-2016
     10# Copyright B. Cornec 2007-today
    1111# Eric Anderson's changes are (c) Copyright 2012 Hewlett Packard
    1212# Provided under the GPL v2
     
    117117} elsif ($scheme eq "dir") {
    118118    pb_system("cp -r $path $destdir","Copying $uri from DIR to $destdir ");
    119 } elsif (($scheme =~ /http/) || ($scheme eq "ftp")) {
    120     my $f = basename($path);
    121     unlink "$ENV{'PBTMP'}/$f";
    122     pb_system("$vcscmd $ENV{'PBTMP'}/$f $uri","Downloading $uri with $vcscmd to $ENV{'PBTMP'}/$f\n");
    123     # We want to preserve the original tar file
    124     pb_vcs_export("file://$ENV{'PBTMP'}/$f",$source,$destdir);
    125     return("$ENV{'PBTMP'}/$f");
    126119} elsif ($scheme =~ /^file/) {
    127120    eval
     
    242235    }
    243236    pb_system("cd $dir ; $vcscmd -d $account\@$host:$path export $cvsopt -d $base $tmp1","Exporting $tmp1 from $source under CVS to $destdir ");
     237} elsif (($scheme =~ /http/) || ($scheme eq "ftp")) {
     238    my $f = basename($path);
     239    unlink "$ENV{'PBTMP'}/$f";
     240    pb_system("$vcscmd $ENV{'PBTMP'}/$f $uri","Downloading $uri with $vcscmd to $ENV{'PBTMP'}/$f\n");
     241    # We want to preserve the original tar file
     242    pb_vcs_export("file://$ENV{'PBTMP'}/$f",$source,$destdir);
     243    return("$ENV{'PBTMP'}/$f");
    244244} else {
    245245    confess "cms $scheme unknown";
Note: See TracChangeset for help on using the changeset viewer.