Changeset 1172 in ProjectBuilder


Ignore:
Timestamp:
Feb 2, 2011, 2:52:37 PM (10 years ago)
Author:
Bruno Cornec
Message:

Fix a bug when initializing a pb env without anything previously available exept the \/bruno/.pbrc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/lib/ProjectBuilder/CMS.pm

    r1156 r1172  
    684684my ($scheme, $account, $host, $port, $path) = pb_get_uri($uri);
    685685
    686 if (($scheme !~ /^cvs/) || ($scheme !~ /^svn/) || ($scheme =~ /^svk/) || ($scheme !~ /^hg/) || ($scheme !~ /^git/) ) {
     686if (($scheme !~ /^cvs/) && ($scheme !~ /^svn/) && ($scheme =~ /^svk/) && ($scheme !~ /^hg/) && ($scheme !~ /^git/) ) {
    687687    # Do not compare if it's not a real cms
    688688    return;
    689 } elsif ((! -d "$ENV{$envar}") || (defined $pbinit)) {
    690     if (defined $pbinit) {
    691         pb_mkdir_p("$ENV{$envar}");
    692     } else {
    693         # Either we have a version in the uri, and it should be the same
    694         # as the one in the envar. Or we should add the version to the uri
    695         if (basename($uri) ne basename($ENV{$envar})) {
    696             $uri .= "/".basename($ENV{$envar})
    697         }
    698         pb_log(1,"Checking out $uri\n");
    699         pb_cms_checkout($scheme,$uri,$ENV{$envar});
    700     }
     689} elsif (defined $pbinit) {
     690    pb_mkdir_p("$ENV{$envar}");
     691} elsif (! -d "$ENV{$envar}") {
     692    # Either we have a version in the uri, and it should be the same
     693    # as the one in the envar. Or we should add the version to the uri
     694    if (basename($uri) ne basename($ENV{$envar})) {
     695        $uri .= "/".basename($ENV{$envar})
     696    }
     697    pb_log(1,"Checking out $uri\n");
     698    pb_cms_checkout($scheme,$uri,$ENV{$envar});
    701699} else {
    702700    pb_log(1,"$uri found locally, checking content\n");
Note: See TracChangeset for help on using the changeset viewer.