Topic Text   Topic Comments (0)   Topic Properties   Topic Information sits@use...
Topic title: CVS commit: * Modified the way Perforce retrieves files f... Tuesday April 18, 2006 03:45:46

Download topic text | View in monospace font | Tab width set to 8 (change to 4)

Files in topic: (view all files)  
codestriker/CHANGELOG  1.184   {+10,-0}
codestriker/INFO.txt  1.7   {+4,-0}
codestriker/codestriker.conf  1.79   {+8,-2}
codestriker/bin/install.pl  1.2   {+1,-3}
codestriker/doc/codestriker.sgml  1.51   {+2,-2}
codestriker/lib/Codestriker.pm  1.82   {+1,-1}
codestriker/lib/Codestriker/DB/Database.pm  1.8   {+3,-0}
codestriker/lib/Codestriker/DB/Oracle.pm  1.7   {+1,-1}
SQLite.pm   {+82,-0}
codestriker/lib/Codestriker/Model/Delta.pm  1.8   {+3,-3}
codestriker/lib/Codestriker/Model/File.pm  1.24   {+3,-3}
codestriker/lib/Codestriker/Repository/Perforce.pm  1.3   {+10,-5}
codestriker/lib/Codestriker/Repository/RepositoryFactory.pm  1.19   {+4,-0}

[Add General Comment] to topic.

File codestriker/lib/Codestriker/Repository/Perforce.pm (Revision 1.3) [Add File Comment] [<<] [Top] [>>]
 
Line 11 | Parallel Line 11 | Parallel
11 11
12 use strict; 12 use strict;
13 13
14 # Constructor, which takes as a parameter the client, hostname and port. 14 # Constructor, which takes as a parameter the password, hostname and port.
15 sub new ($$$$$) { 15 sub new ($$$$$) {
16 my ($type, $user, $client, $hostname, $port) = @_; 16 my ($type, $user, $password, $hostname, $port) = @_;
17 17
18 my $self = {}; 18 my $self = {};
19 $self->{user} = $user; 19 $self->{user} = $user;
20 $self->{client} = $client; 20 $self->{password} = $password;
21 $self->{hostname} = $hostname; 21 $self->{hostname} = $hostname;
22 $self->{port} = $port; 22 $self->{port} = $port;
23 $self->{root} = "perforce:${user}:${client}" . "@" . "${hostname}:${port}"; 23 $self->{root} = "perforce:${user}" .
24 (defined $password && $password ne '' ? ":${password}" : '') .
25 "@" . "${hostname}:${port}";
24 bless $self, $type; 26 bless $self, $type;
25 } 27 }
26 28
 
 
Line 30 | Parallel Line 32 | Parallel
30 my ($self, $filename, $revision, $content_array_ref) = @_; 32 my ($self, $filename, $revision, $content_array_ref) = @_;
31 33
32 # Open a pipe to the local CVS repository. 34 # Open a pipe to the local CVS repository.
35 my $password = $self->{password};
33 open(P4, "\"$Codestriker::p4\"" . 36 open(P4, "\"$Codestriker::p4\"" .
34 " -p " . $self->{hostname} . ':' . $self->{port} . 37 " -p " . $self->{hostname} . ':' . $self->{port} .
35 " -u " . $self->{user} . " -c " . $self->{client} . 38 " -u " . $self->{user} .
39 (defined $password && $password ne '' ?
40 " -P " . $self->{password} : '') .
36 " print -q \"$filename\"" . "#" . "$revision |") 41 " print -q \"$filename\"" . "#" . "$revision |")
37 || die "Can't retrieve data using p4: $!"; 42 || die "Can't retrieve data using p4: $!";
38 43
 
File codestriker/lib/Codestriker/Repository/Perforce.pm (Revision 1.3) [Add File Comment] [<<] [Top] [>>]
  
Legend:
Removed 
Changed
 Added

[Add General Comment] to topic.