Update of /cvsroot/leaf/src/bering-uclibc/buildtool/buildtool/DownloadTypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8667

Modified Files:
        CvsPserver.pm 
Log Message:
cvs pserver was not honouring the OverwriteFiles flag from buildtool config


Index: CvsPserver.pm
===================================================================
RCS file: 
/cvsroot/leaf/src/bering-uclibc/buildtool/buildtool/DownloadTypes/CvsPserver.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CvsPserver.pm       4 Oct 2004 22:58:35 -0000       1.2
--- CvsPserver.pm       12 Jun 2005 21:04:30 -0000      1.3
***************
*** 140,145 ****
        $self->{'PASSWORD'} = $self->scramble("");
    }
!   $self->{'FULLPATH'} = 
$self->stripSlashes(File::Spec->catfile($self->{'DLROOT'
! }, $self->{'FILENAME'}));
  
    # should we use continue of dowloads (aka -c):
--- 140,144 ----
        $self->{'PASSWORD'} = $self->scramble("");
    }
!   $self->{'FULLPATH'} = 
$self->stripSlashes(File::Spec->catfile($self->{'DLROOT'}, 
$self->{'FILENAME'}));
  
    # should we use continue of dowloads (aka -c):
***************
*** 175,209 ****
        my $repo = VCS::LibCVS::Repository->new($reproot);
        my $filename = "";
!       # add serverpath only if it is given
!       if ($self->{'SERVERPATH'} and $self->{'SERVERPATH'} ne "") {
!               $filename .= $self->{'SERVERPATH'} . "/";
!       }
!             
!       if ($self->{'DIR'} and $self->{'DIR'} ne "") {
!               $filename .= $self->{'DIR'} . "/";
!       }
!       $filename .= $self->{'FILENAME'};
!       $self->stripSlashes($filename);
!       #remove leading / if there
!       $filename =~ s/^\///;
!       $self->debug("filename:" . $filename);
!       my $file = VCS::LibCVS::RepositoryFile->new($repo, $filename );
!       
!       my $sticky;
!       
!       if ($self->{'REVISION'} =~ /^[0-9.]+$/) {
!           $sticky = VCS::LibCVS::StickyRevision->new($repo, 
$self->{'REVISION'});
!       } else {
!           $sticky = VCS::LibCVS::StickyTag->new($repo, $self->{'REVISION'});
!       }
!       
!       my $revision = $file->get_revision($sticky);
!       # get everything from server
!       my $contents = $revision->get_contents();
! 
!       open TARGET, "> ". $self->{'FULLPATH'} or confess ("cannot open file ". 
$self->{'FULLPATH'}  .  "for writing   " );
!       # write buffer to file
!       print TARGET $contents->as_string();
!       close TARGET;
  }
  
--- 174,215 ----
        my $repo = VCS::LibCVS::Repository->new($reproot);
        my $filename = "";
!       # check if OverwriteFiles is disabled, if so,
!       # do NOT overwrite 
!       if ( ! $self->overwriteFileOk($self->{'FULLPATH'})) {
!               # just log what we don't do
!               $self->logme("not overwriting file ". $self->{'FULLPATH'}  ." 
as requested");
!               } else {
!               # add serverpath only if it is given
!               if ($self->{'SERVERPATH'} and $self->{'SERVERPATH'} ne "") {
!               $filename .= $self->{'SERVERPATH'} . "/";
!               }
!               
!               if ($self->{'DIR'} and $self->{'DIR'} ne "") {
!               $filename .= $self->{'DIR'} . "/";
!               }
!               $filename .= $self->{'FILENAME'};
!               $self->stripSlashes($filename);
!               #remove leading / if there
!               $filename =~ s/^\///;
!               $self->debug("filename:" . $filename);
!               my $file = VCS::LibCVS::RepositoryFile->new($repo, $filename );
!       
!               my $sticky;
!       
!               if ($self->{'REVISION'} =~ /^[0-9.]+$/) {
!               $sticky = VCS::LibCVS::StickyRevision->new($repo, 
$self->{'REVISION'});
!               } else {
!               $sticky = VCS::LibCVS::StickyTag->new($repo, 
$self->{'REVISION'});
!               }
!       
!               my $revision = $file->get_revision($sticky);
!               # get everything from server
!               my $contents = $revision->get_contents();
!       
!               open TARGET, "> ". $self->{'FULLPATH'} or confess ("cannot open 
file ". $self->{'FULLPATH'}  .  "for writing   " );
!               # write buffer to file
!               print TARGET $contents->as_string();
!               close TARGET;
!       }
  }
  



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
leaf-cvs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/leaf-cvs-commits

Reply via email to