[Codestriker-commits] CVS update: codestriker/lib/Codestriker/Repository Cvs.pm RepositoryFactory.p
                
                Brought to you by:
                
                    sits
                    
                
            
            
        
        
        
    | 
      
      
      From: <si...@us...> - 2007-09-06 08:02:20
      
     | 
|   User: sits    
  Date: 07/09/06 01:02:17
  Modified:    lib      Codestriker.pm
               lib/Codestriker/Repository Cvs.pm RepositoryFactory.pm
  Log:
  Initial support for CVS SSPI repository
  
  
  
  Index: Codestriker.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- Codestriker.pm	12 Jul 2007 10:01:59 -0000	1.102
  +++ Codestriker.pm	6 Sep 2007 08:02:16 -0000	1.103
  @@ -35,7 +35,7 @@
   	      );
   
   # Version of Codestriker.
  -$Codestriker::VERSION = "1.9.4";
  +$Codestriker::VERSION = "1.9.4-rc2";
   
   # Default title to display on each Codestriker screen.
   $Codestriker::title = "Codestriker $Codestriker::VERSION";
  
  
  
  
  
  Index: Cvs.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Cvs.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Cvs.pm	12 Jul 2007 09:49:02 -0000	1.8
  +++ Cvs.pm	6 Sep 2007 08:02:17 -0000	1.9
  @@ -55,6 +55,20 @@
       bless $self, $type;
   }
   
  +# Factory method for creating an SSPI CVS repository object.
  +sub build_sspi {
  +    my ($type, $username, $password, $hostname, $cvsroot) = @_;
  +
  +    my $self = {};
  +    $self->{optional_args} = "";
  +    $self->{username} = $username;
  +    $self->{hostname} = $hostname;
  +    $self->{cvsroot} = $cvsroot;
  +    $self->{url} = ":sspi:${username}:${password}\@${hostname}:${cvsroot}";
  +    bless $self, $type;
  +}
  +
  +
   # Retrieve the data corresponding to $filename and $revision.  Store each line
   # into $content_array_ref.
   sub retrieve {
  
  
  
  
  
  Index: RepositoryFactory.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/RepositoryFactory.pm,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- RepositoryFactory.pm	7 Jun 2007 04:46:27 -0000	1.22
  +++ RepositoryFactory.pm	6 Sep 2007 08:02:17 -0000	1.23
  @@ -48,6 +48,12 @@
   	# Pserver repository.
   	return Codestriker::Repository::Cvs->build_ext($1, $2, $3, $4);
   
  +    } elsif ($repository =~ /^\s*:sspi:(.*):(.*)@(.*):([A-z]:[\\\/].*?)\\*\s*(.*)\s*$/i) {
  +	# NT SSPI CVS repository.  Example:
  +	# :sspi:MYNTDOMAIN\jdoe:password@mycvsserver:c:\repository_on_server
  +	# :sspi:<host address>:\ANDCVS 
  +	return Codestriker::Repository::Cvs->build_sspi($1, $2, $3, $4);
  +
       } elsif ($repository =~ /^\s*(https?:\/\/.*viewcvs\.cgi)\/*\s+(.*?)\/*\s*$/i) {
   	# View CVS repository.
   	return Codestriker::Repository::ViewCvs->new($1, $2);
  
  
  
 |