Ignore:
Timestamp:
Oct 14, 2007, 8:20:11 PM (12 years ago)
Author:
bruno
Message:

Coding of newver in progress

File:
1 edited

Legend:

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

    r199 r204  
    354354}
    355355}
    356    
    357 
     356
     357sub pb_cms_getinfo {
     358my $cms = shift;
     359my $url = "";
     360my $void = "";
     361
     362if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
     363    open(PIPE,"LANGUAGE=C svn info $ENV{'PBROOT'} |") || die "Unable to get svn info from $ENV{'PBROOT'}";
     364    while (<PIPE>) {
     365        ($void,$url) = split(/^Repository Root:/) if (/^Repository Root:/);
     366    }
     367    close(PIPE);
     368} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
     369} else {
     370    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
     371}
     372return($url);
     373}
     374
     375sub pb_cms_copy {
     376my $cms = shift;
     377my $oldurl = shift;
     378my $newurl = shift;
     379
     380if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
     381    pb_system("svn copy $oldurl $newurl","Copying $oldurl to $newurl ");
     382} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
     383} else {
     384    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
     385}
     386}
     387
     388sub pb_cms_checkout {
     389my $cms = shift;
     390my $url = shift;
     391my $destination = shift;
     392
     393if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
     394    pb_system("svn co $url $destination","Checking $url to $destination ");
     395} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
     396} else {
     397    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
     398}
     399}
     400
     401sub pb_cms_isdiff {
     402my $cms = shift;
     403
     404if ($cms->{$ENV{'PBPROJ'}} eq "svn") {
     405    open(PIPE,"svn diff $ENV{'PBROOT'} |") || die "Unable to get svn diff from $ENV{'PBROOT'}";
     406    my $l = 0;
     407    while (<PIPE>) {
     408        $l++;
     409    }
     410    return($l);
     411} elsif ($cms->{$ENV{'PBPROJ'}} eq "cvs") {
     412} else {
     413    die "cms $cms->{$ENV{'PBPROJ'}} unknown";
     414}
     415}
    358416
    359417# Get all filters to apply
Note: See TracChangeset for help on using the changeset viewer.