codestriker-commits Mailing List for Codestriker: collaborative code reviewer (Page 23)
Brought to you by:
sits
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(58) |
Dec
(14) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(12) |
Feb
(53) |
Mar
(2) |
Apr
|
May
(36) |
Jun
(59) |
Jul
(69) |
Aug
(47) |
Sep
(54) |
Oct
(45) |
Nov
|
Dec
|
| 2006 |
Jan
(20) |
Feb
(3) |
Mar
|
Apr
(6) |
May
(13) |
Jun
(18) |
Jul
(9) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2007 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(1) |
May
(2) |
Jun
(7) |
Jul
(7) |
Aug
(6) |
Sep
(5) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
(7) |
Feb
(13) |
Mar
(9) |
Apr
|
May
|
Jun
(50) |
Jul
(22) |
Aug
(58) |
Sep
(28) |
Oct
|
Nov
|
Dec
|
|
From: <si...@us...> - 2004-11-17 10:05:05
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=6999444&action=view&brmode=1&fview=-1 User: sits Date: 04/11/17 02:04:41 Modified: . CHANGELOG codestriker.conf lib/Codestriker/Action SubmitNewTopic.pm lib/Codestriker/Repository RepositoryFactory.pm Subversion.pm lib/Codestriker/TopicListeners Email.pm template/en/default createtopic.html.tmpl Log: The following changes are from Jason Remillard: * Fixed a security problem with the repository not being checked against the actual configured list. A user could send in any well formed repository string and Codestriker would just take it, even if it was not configured. * Fixed a bug preventing create topic from working when the user had just one repository working. The cookie was overriding it because it was missing from the html code. * Subversion repositories can now be configured with a username and password in the configuration file if authentication is required. Any errors from accessing subversion are written to STDERR. Index: CHANGELOG =================================================================== RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v retrieving revision 1.153 retrieving revision 1.154 diff -u -r1.153 -r1.154 --- CHANGELOG 9 Nov 2004 21:01:03 -0000 1.153 +++ CHANGELOG 17 Nov 2004 10:04:34 -0000 1.154 @@ -38,6 +38,21 @@ status bar or in a tool-tip when hovering over a commented line in the view topic window. + The following changes are from Jason Remillard: + +* Fixed a security problem with the repository not being checked + against the actual configured list. A user could send in any well + formed repository string and Codestriker would just take it, even if + it was not configured. + +* Fixed a bug preventing create topic from working when the user had + just one repository working. The cookie was overriding it because it + was missing from the html code. + +* Subversion repositories can now be configured with a username and + password in the configuration file if authentication is required. + Any errors from accessing subversion are written to STDERR. + Version 1.8.4 * The topic properties page now displays the start tag, end tag and Index: codestriker.conf =================================================================== RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- codestriker.conf 1 Nov 2004 09:04:24 -0000 1.65 +++ codestriker.conf 17 Nov 2004 10:04:34 -0000 1.66 @@ -73,7 +73,9 @@ # repository which contains the URL to a viewcvs installation (CVS web # is also supported), followed by the CVSROOT of the repository. The # next example is the syntax used for specifying a Subversion repository, -# which is simple the subversion repository URL prefixed by svn: +# which is simply the subversion repository URL prefixed by svn: If your +# subversion server requires authentication, then the user name and +# passwords should be added to the end and separated by semicolons. # # The next three examples are for pserver repositories. The full # username, password, hostname and repository form must be used here. @@ -104,6 +106,7 @@ '/home/sits/cvs', 'http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi /cvsroot', 'svn:http://svn.collab.net/repos/svn/trunk', + 'svn:http://svn.collab.net/repos/svn/trunk;username;password', ':pserver:sits:pas...@cv...:/cvsroot', ':pserver;proxy=abc.com;proxyport=8080:sits:pw...@cv...', ':pserver:anonymous:@cvs.sourceforge.net:/cvsroot', Index: SubmitNewTopic.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/SubmitNewTopic.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- SubmitNewTopic.pm 3 Nov 2004 20:48:33 -0000 1.18 +++ SubmitNewTopic.pm 17 Nov 2004 10:04:38 -0000 1.19 @@ -112,13 +112,22 @@ my $repository = undef; if (scalar(@Codestriker::valid_repositories)) { # Set the repository to the default if it is not entered. - if ($repository_url eq "") { + if ($repository_url eq "" || scalar(@Codestriker::valid_repositories) == 1) { $repository_url = $Codestriker::valid_repositories[0]; } - # Check if the repository argument is valid. + # Check if the repository argument is in fact a configured + # repository. + my $configured = 0; + foreach my $rep ( @Codestriker::valid_repositories ) { + $configured = 1 if $repository_url eq $rep; + } + + if ($configured) { $repository = Codestriker::Repository::RepositoryFactory->get($repository_url); + } + if (! defined $repository) { $feedback .= "The repository value \"$repository_url\" is invalid.\n" . Index: RepositoryFactory.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/RepositoryFactory.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- RepositoryFactory.pm 28 Oct 2004 03:49:46 -0000 1.18 +++ RepositoryFactory.pm 17 Nov 2004 10:04:39 -0000 1.19 @@ -30,42 +30,59 @@ if ($repository =~ /^\s*(\/.*?)\/*\s*$/) { # CVS repository on the local machine. return Codestriker::Repository::Cvs->build_local($1, ''); + } elsif ($repository =~ /^\s*:local:([A-z]:[\\\/].*?)\\*\s*$/) { # Windoze "local" CVS repository. return Codestriker::Repository::Cvs->build_local($1, ':local:'); + } elsif ($repository =~ /^\s*([A-z]:[\\\/].*?)\\*\s*$/) { # Windoze CVS repository. return Codestriker::Repository::Cvs->build_local($1, ''); + } elsif ($repository =~ /^\s*:pserver(.*):(.*):(.*)@(.*):(.*)\s*$/i) { # Pserver repository. return Codestriker::Repository::Cvs->build_pserver($1, $2, $3, $4, $5); + } elsif ($repository =~ /^\s*:ext(.*):(.*)@(.*):(.*)\s*$/i) { # Pserver repository. return Codestriker::Repository::Cvs->build_ext($1, $2, $3, $4); + } elsif ($repository =~ /^\s*(https?:\/\/.*viewcvs\.cgi)\/*\s+(.*?)\/*\s*$/i) { # View CVS repository. return Codestriker::Repository::ViewCvs->new($1, $2); + } elsif ($repository =~ /^\s*(https?:\/\/.*cvsweb\.cgi)\/*\s+(.*?)\/*\s*$/i) { # CVS web repository. return Codestriker::Repository::CvsWeb->new($1, $2); + + } elsif ($repository =~ /^\s*svn:(.*)\s*;(.*);(.*)$/i) { + # Subversion repository with username and password + return Codestriker::Repository::Subversion->new($1, $2, $3); + } elsif ($repository =~ /^\s*svn:(.*)\s*$/i) { - # native Subversion repository. + # Subversion repository. return Codestriker::Repository::Subversion->new($1); + } elsif ($repository =~ /^\s*perforce:(.*):(.*)@(.*):(.*)\s*$/i) { # Perforce repository. return Codestriker::Repository::Perforce->new($1, $2, $3, $4); + } elsif ($repository =~ /^\s*vss:(.*);(.*);(.*)$/i) { # Visual Source Safe repository spec with SSDIR, user and password. return Codestriker::Repository::Vss->new($2,$3,$1); + } elsif ($repository =~ /^\s*vss:(.*);(.*)$/i) { # Visual Source Safe repository spec with user and password. return Codestriker::Repository::Vss->new($1,$2); + } elsif ($repository =~ /^\s*vss:(.*):(.*)$/i) { # Older-style Visual Source Safe (VSS) repository spec. return Codestriker::Repository::Vss->new($1,$2); + } elsif ($repository =~ /^\s*clearcase:(.*)$/i) { # ClearCase Snapshot repository. return Codestriker::Repository::ClearCaseSnapshot->new($1); + } else { # Unknown repository type. print STDERR "Codestriker: Couldn't match repository: \"$repository\"\n"; Index: Subversion.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Subversion.pm 18 Oct 2004 23:43:57 -0000 1.7 +++ Subversion.pm 17 Nov 2004 10:04:39 -0000 1.8 @@ -14,10 +14,25 @@ # Constructor, which takes as a parameter the repository url. sub new ($$) { - my ($type, $repository_url) = @_; + my ($type, $repository_url, $user, $password) = @_; + + my $userCmdLine = ""; + if (defined($user) && defined($password)) { + $userCmdLine = "--username $user --password $password "; + } + + + # Make sure the repo url does not end in a /, the + # rest of the module assumes that it does not. + $repository_url =~ s/[\\\/]^//; + + # Replace any spaces with %20 uri friendly escapes. + $repository_url =~ s/ /%20/g; my $self = {}; $self->{repository_url} = $repository_url; + $self->{userCmdLine} = $userCmdLine; + bless $self, $type; } @@ -26,17 +41,37 @@ sub retrieve ($$$\$) { my ($self, $filename, $revision, $content_array_ref) = @_; - # Open a pipe to the local Subversion repository. - open(SVN, "svn cat --revision $revision \"" . $self->{repository_url} . - "/$filename\" 2>/dev/null |") - || die "Can't retrieve information from Subversion repository: $!"; + # Replace any spaces with %20 uri friendly escapes. + $filename =~ s/ /%20/g; + + my $cmd = "svn cat --non-interactive --no-auth-cache " . $self->{userCmdLine} . + "--revision $revision " . + "\"" . $self->{repository_url} . "/$filename\""; + + my $write_stdin_fh = new FileHandle; + my $read_stdout_fh = new FileHandle; + my $read_stderr_fh = new FileHandle; + + my $pid = open3($write_stdin_fh,$read_stdout_fh,$read_stderr_fh,$cmd); # Read the data. - for (my $i = 1; <SVN>; $i++) { + for (my $i = 1; <$read_stdout_fh>; $i++) { chop; $$content_array_ref[$i] = $_; } - close SVN; + + # Log anything on standard error to apache error log + # along with the cmd that caused the error. + + my $buf; + my $first_lines = 1; + while (read($read_stderr_fh, $buf, 16384)) { + print STDERR "$cmd\n" if $first_lines; + $first_lines = 0; + print STDERR $buf; + } + + waitpid($pid, 0); } # Retrieve the "root" of this repository. @@ -65,7 +100,8 @@ sub getDiff ($$$$$) { my ($self, $start_tag, $end_tag, $module_name, $stdout_fh, $stderr_fh) = @_; - my $cmd = "svn diff --non-interactive -r $start_tag:$end_tag " . + my $cmd = "svn diff --non-interactive --no-auth-cache " . $self->{userCmdLine} . + "-r $start_tag:$end_tag " . "--old \"$self->{repository_url}\" \"$module_name\""; my $write_stdin_fh = new FileHandle; @@ -74,7 +110,7 @@ my $pid = open3($write_stdin_fh, $read_stdout_fh, $read_stderr_fh,$cmd); - # Make sure the module does not end or start with a / + # Make sure the moduel does not end or start with a / $module_name =~ s/\\$//; $module_name =~ s/^\\//; Index: Email.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Email.pm 3 Nov 2004 20:48:33 -0000 1.11 +++ Email.pm 17 Nov 2004 10:04:40 -0000 1.12 @@ -409,9 +409,15 @@ $recipients .= ", $bcc" if $bcc ne ""; my @receiver = split /, /, $recipients; for (my $i = 0; $i <= $#receiver; $i++) { + if ($receiver[$i] ne "") { $smtp->recipient($receiver[$i]); $smtp->ok() || die "Couldn't send email to \"$receiver[$i]\" $!, " . $smtp->message(); + } else { + # Can't track down why, but sometimes an empty email address + # pops into here and kills the entire thing. This makes the + # problem go away. + } } $smtp->data(); Index: createtopic.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/createtopic.html.tmpl,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- createtopic.html.tmpl 1 Nov 2004 10:43:55 -0000 1.37 +++ createtopic.html.tmpl 17 Nov 2004 10:04:40 -0000 1.38 @@ -150,7 +150,6 @@ [%# The repository the review is made against #%] [%# Only display the repository select if there is more than one #%] [% IF repositories.size > 1 %] -[% IF allow_repositories != 0 %] <TR> <TD>Repository: <FONT SIZE="-2"><A HREF="javascript:alert(' @@ -174,7 +173,6 @@ </TD> </TR> [% END %] -[% END %] [% IF projects_enabled != 0 %] |
|
From: <si...@us...> - 2004-11-17 10:04:46
|
Topic "CVS commit: The following changes are from Jason Remill..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=6999444&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: The following changes are from Jason Remillard: * Fixed a security problem with the repository not being checked against the actual configured list. A user could send in any well formed repository string and Codestriker would just take it, even if it was not configured. * Fixed a bug preventing create topic from working when the user had just one repository working. The cookie was overriding it because it was missing from the html code. * Subversion repositories can now be configured with a username and password in the configuration file if authentication is required. Any errors from accessing subversion are written to STDERR. -------------------------------------------------------------- The topic was created with the following files: codestriker/CHANGELOG codestriker/codestriker.conf codestriker/lib/Codestriker/Action/SubmitNewTopic.pm codestriker/lib/Codestriker/Repository/RepositoryFactory.pm codestriker/lib/Codestriker/Repository/Subversion.pm codestriker/lib/Codestriker/TopicListeners/Email.pm codestriker/template/en/default/createtopic.html.tmpl |
|
From: <si...@us...> - 2004-11-16 21:40:33
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=872331&action=view&brmode=1&fview=-1 User: sits Date: 04/11/16 13:40:21 Modified: lib/Codestriker/FileParser Parser.pm Log: Make the file extension matcher more generic. Index: Parser.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Parser.pm 12 Nov 2004 07:18:39 -0000 1.17 +++ Parser.pm 16 Nov 2004 21:40:19 -0000 1.18 @@ -169,7 +169,7 @@ my @trimmed_diffs = (); foreach my $curr (@diffs) { - if ($curr->{filename} =~ /\.(\w+)(,v)?$/o) { + if ($curr->{filename} =~ /\.([^\.]+)(,v)?$/o) { push @trimmed_diffs, $curr unless grep(/^$1$/, @Codestriker::exclude_file_types); } else { |
|
From: <si...@us...> - 2004-11-16 21:40:27
|
Topic "CVS commit: Make the file extension matcher more generic." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=872331&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Make the file extension matcher more generic. -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/FileParser/Parser.pm |
|
From: <si...@us...> - 2004-11-15 10:44:24
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3611675&action=view&brmode=1&fview=-1 User: sits Date: 04/11/15 02:44:07 Modified: lib/Codestriker/FileParser BasicDiffUtils.pm Log: Handle broken VSS diff formats Index: BasicDiffUtils.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/BasicDiffUtils.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- BasicDiffUtils.pm 21 Oct 2004 08:22:55 -0000 1.3 +++ BasicDiffUtils.pm 15 Nov 2004 10:44:06 -0000 1.4 @@ -97,9 +97,22 @@ } # If there is both old and new text, read the separator line. + # Note bloody VSS for some versions will put the --- at the end of + # the previous line rather than on a new line! if ($old_length > 0 && $new_length > 0) { + my $previous_line = $line; + my $pos = $fh->getpos; $line = <$fh>; - return undef unless defined $line && $line =~ /^\-\-\-$/; + return undef unless defined $line; + if ($line !~ /^\-\-\-$/o && $chunk_text =~ /^(.*)\-\-\-$/os) { + # Stupid VSS diff format, chop off the seperator characters + # and move the file pointer back. + $chunk_text = "$1\n"; + $fh->setpos($pos); + } elsif ($line !~ /^\-\-\-$/o) { + # Didn't match standard separator, some other format. + return undef; + } } # Now read the new lines, if any. |
|
From: <si...@us...> - 2004-11-15 10:44:21
|
Topic "CVS commit: Handle broken VSS diff formats" Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3611675&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Handle broken VSS diff formats -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/FileParser/BasicDiffUtils.pm |
|
From: <si...@us...> - 2004-11-15 10:43:47
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=9361908&action=view&brmode=1&fview=-1 User: sits Date: 04/11/15 02:43:31 Added: test/testtopictexts vss12.txt vss13.txt Log: New example VSS topic texts Index: vss12.txt =================================================================== RCS file: vss12.txt diff -N vss12.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ vss12.txt 15 Nov 2004 10:43:29 -0000 1.1 @@ -0,0 +1,13 @@ +Version not found +Version not found +Version not found +Version not found +Version not found +Diffing: $/JonathanTest/test.txt;version1 +Against: $/JonathanTest/test.txt;version3 + +1c1,3 +< version 1--- +> version 2 +> +> This used to be version 1 Index: vss13.txt =================================================================== RCS file: vss13.txt diff -N vss13.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ vss13.txt 15 Nov 2004 10:43:29 -0000 1.1 @@ -0,0 +1,8 @@ +Diffing: $/JonathanTest/test.txt;version1 +Against: $/JonathanTest/test.txt;version3 + +1c1,3 +< version 1--- +> version 2 +> +> This used to be version 1 |
|
From: <si...@us...> - 2004-11-15 10:43:36
|
Topic "CVS commit: New example VSS topic texts" Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=9361908&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: New example VSS topic texts -------------------------------------------------------------- The topic was created with the following files: vss12.txt vss13.txt |
|
From: <si...@us...> - 2004-11-12 07:18:49
|
User: sits
Date: 04/11/11 23:18:41
Modified: lib/Codestriker/FileParser Parser.pm VssDiff.pm
Log:
Set uploaded_file if blank in Parse.pm. This is useful for those
topic diffs created by an SCM which could not be parsed, or resulted
in no diff chunks.
Index: Parser.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Parser.pm 12 Nov 2004 03:11:16 -0000 1.16
+++ Parser.pm 12 Nov 2004 07:18:39 -0000 1.17
@@ -142,6 +142,9 @@
# Last stop-gap - the file format is unknown, treat it as a
# single file with filename "unknown".
if ($#diffs == -1) {
+ if (! defined $uploaded_filename || $uploaded_filename eq '') {
+ $uploaded_filename = 'unknown.txt';
+ }
seek($tmpfh, 0, 0) ||
die "Unable to seek to the start of the temporary file: $!";
@diffs = Codestriker::FileParser::UnknownFormat->
Index: VssDiff.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/VssDiff.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- VssDiff.pm 12 Nov 2004 04:07:22 -0000 1.7
+++ VssDiff.pm 12 Nov 2004 07:18:39 -0000 1.8
@@ -61,7 +61,7 @@
# The next part of the diff will be the old style diff format, or
# possibly "No differences." if there are no differences.
$line = <$fh>;
- if ($line !~ /^No differences\./) {
+ if ($line !~ /^No differences\./o) {
my $chunk;
do
{
|
|
From: <si...@us...> - 2004-11-12 04:07:36
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3044597&action=view&brmode=1&fview=-1 User: sits Date: 04/11/11 20:07:24 Modified: lib/Codestriker/FileParser VssDiff.pm Log: Handle the Version not found lines Index: VssDiff.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/VssDiff.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- VssDiff.pm 21 Oct 2004 07:08:28 -0000 1.6 +++ VssDiff.pm 12 Nov 2004 04:07:22 -0000 1.7 @@ -30,7 +30,8 @@ my $repmatch; # Skip whitespace. - while (defined($line) && $line =~ /^\s*$/o) { + while (defined($line) && + ($line =~ /^\s*$/o || $line =~ /^Version not found/o)) { $line = <$fh>; } return @result unless defined $line; @@ -38,7 +39,6 @@ # For VSS diffs, the start of the diff block is the "Diffing:" line # which contains the filename and version number. Some diffs may # not contain the version number for us. - return () unless defined $line; if ($line =~ /^Diffing: (.*);(.+)$/o) { $filename = $1; $revision = $2; |
|
From: <si...@us...> - 2004-11-12 04:07:30
|
Topic "CVS commit: Handle the Version not found lines" Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3044597&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Handle the Version not found lines -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/FileParser/VssDiff.pm |
|
From: <si...@us...> - 2004-11-12 03:12:14
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=6312520&action=view&brmode=1&fview=-1 User: sits Date: 04/11/11 19:11:18 Modified: lib/Codestriker/FileParser Parser.pm Log: Fixed bug where filenames in a delta with no extension were excluded from the final topic text. Index: Parser.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- Parser.pm 3 Nov 2004 22:37:34 -0000 1.15 +++ Parser.pm 12 Nov 2004 03:11:16 -0000 1.16 @@ -169,6 +169,9 @@ if ($curr->{filename} =~ /\.(\w+)(,v)?$/o) { push @trimmed_diffs, $curr unless grep(/^$1$/, @Codestriker::exclude_file_types); + } else { + # No extension on this file, add the diff in. + push @trimmed_diffs, $curr; } } |
|
From: <si...@us...> - 2004-11-12 03:12:04
|
Topic "CVS commit: Fixed bug where filenames in a delta with no ..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=6312520&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Fixed bug where filenames in a delta with no extension were excluded from the final topic text. -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/FileParser/Parser.pm |
|
From: <si...@us...> - 2004-11-09 22:18:59
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=1919759&action=view&brmode=1&fview=-1 User: sits Date: 04/11/09 14:18:45 Modified: lib/Codestriker/Repository Vss.pm Log: VSS diff generation can now handle a file for the module field. Index: Vss.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Vss.pm,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Vss.pm 8 Nov 2004 22:40:26 -0000 1.18 +++ Vss.pm 9 Nov 2004 22:18:41 -0000 1.19 @@ -15,7 +15,7 @@ use IO::Handle; # Switch for emitting debug information. -my $_DEBUG = 1; +my $_DEBUG = 0; # Constructor, which takes the username and password as parameters. sub new { @@ -162,7 +162,13 @@ # Collect the list of filename and revision numbers into a list. my @files = (); my @versions = (); + + # Initialise this in case module just refers to a single file. my $current_dir = ''; + if ($module_name =~ /^(.*)\/[^\/]+$/o) { + $current_dir = $1; + } + while (<VSS>) { if (/^(\$\/.*):$/o) { # Entering a new top-level directory. |
|
From: <si...@us...> - 2004-11-09 22:18:52
|
Topic "CVS commit: VSS diff generation can now handle a file for..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=1919759&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: VSS diff generation can now handle a file for the module field. -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/Repository/Vss.pm |
|
From: <si...@us...> - 2004-11-09 21:01:31
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=2101609&action=view&brmode=1&fview=-1 User: sits Date: 04/11/09 13:01:19 Modified: . CHANGELOG lib/Codestriker/Action SubmitEditTopicProperties.pm lib/Codestriker/Http Render.pm template/en/default viewtopicproperties.html.tmpl Log: Topics can now be obsoleted from the topic properties screen, by selecting the Obsoleted state. Also minor fix where " characters would not render correctly in the status bar or in a tool-tip when hovering over a commented line in the view topic window. Index: CHANGELOG =================================================================== RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v retrieving revision 1.152 retrieving revision 1.153 diff -u -r1.152 -r1.153 --- CHANGELOG 3 Nov 2004 20:48:32 -0000 1.152 +++ CHANGELOG 9 Nov 2004 21:01:03 -0000 1.153 @@ -34,6 +34,10 @@ * Shorten the URLs sent in the email messages. +* Minor fix where " characters would not render correctly in the + status bar or in a tool-tip when hovering over a commented line in + the view topic window. + Version 1.8.4 * The topic properties page now displays the start tag, end tag and Index: SubmitEditTopicProperties.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Action/SubmitEditTopicProperties.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- SubmitEditTopicProperties.pm 29 Jun 2004 02:51:41 -0000 1.8 +++ SubmitEditTopicProperties.pm 9 Nov 2004 21:01:10 -0000 1.9 @@ -36,9 +36,11 @@ my $repository_url = $http_input->get('repository'); my $projectid = $http_input->get('projectid'); - # Check if this action is allowed. + # Check if this action is allowed, and that the state is valid. if ($Codestriker::allow_delete == 0 && $topic_state eq "Delete") { $http_response->error("This function has been disabled"); + } elsif (! grep /^$topic_state$/, @Codestriker::topic_states) { + $http_response->error("Topic state $topic_state unrecognised"); } # Retrieve the current state of the topic. @@ -89,6 +91,15 @@ $feedback = "Topic has been deleted."; } } + elsif ($topic_state eq "Obsoleted") { + # Redirect to the create topic screen with this topic being + # the one to obsolete. + my $url_builder = Codestriker::Http::UrlBuilder->new($query); + my $create_topic_url = + $url_builder->create_topic_url("$topicid,$version"); + print $query->redirect(-URI=>$create_topic_url); + return; + } else { # The input looks good, update the database. $rc = $topic->update($topic_title, $author, $reviewers, $cc, Index: Render.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Render.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- Render.pm 27 Sep 2004 11:13:13 -0000 1.38 +++ Render.pm 9 Nov 2004 21:01:15 -0000 1.39 @@ -771,7 +771,6 @@ } my $link_title = $self->get_comment_digest($line, $filenumber, $new); - $link_title =~ s/\"/"/mg; my $js_title = $link_title; $js_title =~ s/\'/\\\'/mg; my $anchor = $key; Index: viewtopicproperties.html.tmpl =================================================================== RCS file: /cvsroot/codestriker/codestriker/template/en/default/viewtopicproperties.html.tmpl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- viewtopicproperties.html.tmpl 30 Sep 2004 22:58:06 -0000 1.12 +++ viewtopicproperties.html.tmpl 9 Nov 2004 21:01:16 -0000 1.13 @@ -193,7 +193,7 @@ When a topic is created, it is initialised in state \'open\'.\n Once a topic has been reviewed, and the code has been committed,\n the state should be updated to \'committed\'. If the code\n -in this review is not be committed, perhaps because a\n +in this review is not to be committed, perhaps because a\n new review will superceed this one, or because it was rejected,\n the state should be changed to \'closed\'.\n \n @@ -202,7 +202,10 @@ all associated bugs, as a form of tracking.\n \n The topic states are also useful as a form of filtering, when\n -retrieving lists of topics from the search page. +retrieving lists of topics from the search page.\n +\n +This topic can be superceeded by a new topic, by selecting the\n +state \'obsoleted\'. ')">(What's this?)</A></FONT> </td> <td> |
|
From: <si...@us...> - 2004-11-09 21:01:24
|
Topic "CVS commit: Topics can now be obsoleted from the topic pr..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=2101609&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Topics can now be obsoleted from the topic properties screen, by selecting the Obsoleted state. Also minor fix where " characters would not render correctly in the status bar or in a tool-tip when hovering over a commented line in the view topic window. -------------------------------------------------------------- The topic was created with the following files: codestriker/CHANGELOG codestriker/lib/Codestriker/Action/SubmitEditTopicProperties.pm codestriker/lib/Codestriker/Http/Render.pm codestriker/template/en/default/viewtopicproperties.html.tmpl |
|
From: <si...@us...> - 2004-11-08 22:40:40
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=7583258&action=view&brmode=1&fview=-1 User: sits Date: 04/11/08 14:40:27 Modified: lib/Codestriker/Repository Vss.pm Log: Removed debugging Index: Vss.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Vss.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Vss.pm 8 Nov 2004 22:37:52 -0000 1.17 +++ Vss.pm 8 Nov 2004 22:40:26 -0000 1.18 @@ -93,9 +93,8 @@ } # Remove the temporary directory and batch file. - print STDERR "Dir is $tempdir\n"; - #unlink $tmp_batch_file; - #rmdir $tempdir; + unlink $tmp_batch_file; + rmdir $tempdir; } # Retrieve the "root" of this repository. |
|
From: <si...@us...> - 2004-11-08 22:40:32
|
Topic "CVS commit: Removed debugging" Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=7583258&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Removed debugging -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/Repository/Vss.pm |
|
From: <si...@us...> - 2004-11-08 22:38:17
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=5504246&action=view&brmode=1&fview=-1 User: sits Date: 04/11/08 14:37:54 Modified: lib/Codestriker/Repository Vss.pm Log: Swtich to creating a temporary batch file (so that the SSDIR environment variable can be set) and executing it for all ss.exe commands. Index: Vss.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Vss.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Vss.pm 3 Nov 2004 22:00:13 -0000 1.16 +++ Vss.pm 8 Nov 2004 22:37:52 -0000 1.17 @@ -33,27 +33,19 @@ # the correct VSS repository. We can't do this with $ENV since # apache2 doesn't allow us to do this. We assume perl is in the # PATH. -sub _wrap_vss_command { - my ($self, $cmd) = @_; +sub _write_vss_command { + my ($self, $cmd, $tmpfile) = @_; my $ssdir = $self->{ssdir}; - if (defined $ssdir) { - my $perl_cmd = $cmd; - $perl_cmd =~ s/\"/\\\"/g; - $perl_cmd = "perl -e \"" . - (defined $ssdir ? "\$ENV{SSDIR}='$ssdir' ; " : "") . - "system('$perl_cmd')\""; - print STDERR "Executing $perl_cmd\n" if $_DEBUG; - flush STDERR if $_DEBUG; - return $perl_cmd; - } - else { - # No need to change the command, as SSDIR does not need to be set. - print STDERR "Executing $cmd\n" if $_DEBUG; - flush STDERR if $_DEBUG; - return $cmd; - } + open (TMPFILE, ">$tmpfile") || die "Can't open $tmpfile: $!"; + print TMPFILE "\@echo off\n"; + print STDERR "\@echo off\n" if $_DEBUG; + print TMPFILE "set SSDIR=$ssdir\n" if defined $ssdir; + print STDERR "set SSDIR=$ssdir\n" if defined $ssdir && $_DEBUG; + print TMPFILE "$cmd\n"; + print STDERR "$cmd\n" if $_DEBUG; + close TMPFILE; } # Retrieve the data corresponding to $filename and $revision. Store each line @@ -61,6 +53,10 @@ sub retrieve ($$$\$) { my ($self, $filename, $revision, $content_array_ref) = @_; + # VSS command to use. + my $vss = $Codestriker::vss; + $vss =~ s/\//\\/g; + # Create a temporary directory where all of the temporary files # will be written to. my $tempdir; @@ -71,15 +67,19 @@ $tempdir = tempdir(CLEANUP => 1); } + # Temporary Batch file for executing VSS commands. + my $tmp_batch_file = "$tempdir/tmp.bat"; + # Retrieve a read-only copy of the file into a temporary # directory. Make sure the command output is put into # a temporary file, rather than stdout/stderr. my $varg = ($revision =~ /^\d+$/) ? "-V$revision" : "\"-VL$revision\""; my $command_output = "$tempdir\\___output.txt"; - my $cmd = "\"$Codestriker::vss\" get \"$filename\"" . + my $cmd = "\"$vss\" get \"$filename\"" . " -y" . $self->{username} . "," . $self->{password} . " $varg -I-Y -O\"$command_output\" -GWR -GL\"$tempdir\""; - system($self->_wrap_vss_command($cmd)); + $self->_write_vss_command($cmd, $tmp_batch_file); + system($tmp_batch_file); $filename =~ /\/([^\/]+)$/o; my $basefilename = $1; @@ -92,8 +92,10 @@ unlink "$tempdir/$basefilename"; } - # Remove the temporary directory. - rmdir $tempdir; + # Remove the temporary directory and batch file. + print STDERR "Dir is $tempdir\n"; + #unlink $tmp_batch_file; + #rmdir $tempdir; } # Retrieve the "root" of this repository. @@ -121,6 +123,10 @@ sub getDiff ($$$$$) { my ($self, $start_tag, $end_tag, $module_name, $fh, $error_fh) = @_; + # VSS command to use. + my $vss = $Codestriker::vss; + $vss =~ s/\//\\/g; + # Currently we only support either start_tag or end_tag being set. my $tag = ''; $tag = $start_tag if $start_tag ne '' && $end_tag eq ''; @@ -138,16 +144,20 @@ $tempdir = tempdir(CLEANUP => 1); } + # Temporary Batch file for executing VSS commands. + my $tmp_batch_file = "$tempdir/tmp.bat"; + # Execute the VSS command to retrieve all of the entries in this label. # Note we can't set SSDIR in the environment, so we need to do that in # the command below. my $ssdir = $self->{ssdir}; - my $cmd = "\"$Codestriker::vss\" dir \"$module_name\"" . + my $cmd = "\"$vss\" dir \"$module_name\"" . " -y" . $self->{username} . "," . $self->{password} . " -R \"-VL${tag}\" -I-Y"; + $self->_write_vss_command($cmd, $tmp_batch_file); - open(VSS, $self->_wrap_vss_command($cmd) . " |") + open(VSS, "$tmp_batch_file |") || die "Can't open connection to VSS repository: $!"; # Collect the list of filename and revision numbers into a list. @@ -177,10 +187,11 @@ # files. for (my $i = 0; $i <= $#files; $i++) { # Determine if the file is a text file, and if not, skip it. - $cmd = "\"$Codestriker::vss\" properties \"$files[$i]\"" . + $cmd = "\"$vss\" properties \"$files[$i]\"" . " -y" . $self->{username} . "," . $self->{password} . " -I-Y"; - open(VSS, $self->_wrap_vss_command($cmd) . " |") + $self->_write_vss_command($cmd, $tmp_batch_file); + open(VSS, "$tmp_batch_file |") || die "Unable to run ss properties on $files[$i]\n"; my $text_type = 0; while (<VSS>) { @@ -194,11 +205,12 @@ my $command_output = "$tempdir\\___output.txt"; if ($start_tag ne '' && $end_tag ne '') { - $cmd = "\"$Codestriker::vss\" diff \"$files[$i]\"" . + $cmd = "\"$vss\" diff \"$files[$i]\"" . " -y" . $self->{username} . "," . $self->{password} . " -I-Y -DU3000X5 \"-VL${start_tag}~L${end_tag}\"" . " -O\"$command_output\""; - system($self->_wrap_vss_command($cmd)); + $self->_write_vss_command($cmd, $tmp_batch_file); + system($tmp_batch_file); if (open(VSS, $command_output)) { while (<VSS>) { print $fh $_; @@ -209,10 +221,11 @@ # Retrieve a read-only copy of the file into a temporary # directory. Make sure the command output is put into # a temporary file, rather than stdout/stderr. - $cmd = "\"$Codestriker::vss\" get \"$files[$i]\"" . + $cmd = "\"$vss\" get \"$files[$i]\"" . " -y" . $self->{username} . "," . $self->{password} . " \"-VL${tag}\" -I-Y -O\"$command_output\" -GWR -GL\"$tempdir\""; - system($self->_wrap_vss_command($cmd)); + $self->_write_vss_command($cmd, $tmp_batch_file); + system($tmp_batch_file); $files[$i] =~ /\/([^\/]+)$/o; my $basefilename = $1; @@ -238,7 +251,8 @@ print $fh "\n"; } - # Remove the temporary directory. + # Remove the temporary directory and temporary batch file. + unlink $tmp_batch_file; rmdir $tempdir; return $Codestriker::OK; |
|
From: <si...@us...> - 2004-11-08 22:38:06
|
Topic "CVS commit: Swtich to creating a temporary batch file (so..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=5504246&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Swtich to creating a temporary batch file (so that the SSDIR environment variable can be set) and executing it for all ss.exe commands. -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/Repository/Vss.pm |
|
From: <si...@us...> - 2004-11-03 22:37:51
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=4501313&action=view&brmode=1&fview=-1 User: sits Date: 04/11/03 14:37:36 Modified: lib/Codestriker/FileParser Parser.pm Log: Handle exclusions for unmatched cvs diffs, from Dave Clendenan Index: Parser.pm =================================================================== RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Parser.pm 2 Nov 2004 21:04:19 -0000 1.14 +++ Parser.pm 3 Nov 2004 22:37:34 -0000 1.15 @@ -166,7 +166,7 @@ my @trimmed_diffs = (); foreach my $curr (@diffs) { - if ($curr->{filename} =~ /\.(\w+)$/o) { + if ($curr->{filename} =~ /\.(\w+)(,v)?$/o) { push @trimmed_diffs, $curr unless grep(/^$1$/, @Codestriker::exclude_file_types); } |
|
From: <si...@us...> - 2004-11-03 22:37:46
|
Topic "CVS commit: Handle exclusions for unmatched cvs diffs, fr..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=4501313&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: Handle exclusions for unmatched cvs diffs, from Dave Clendenan -------------------------------------------------------------- The topic was created with the following files: codestriker/lib/Codestriker/FileParser/Parser.pm |
|
From: <si...@us...> - 2004-11-03 22:05:54
|
Created Codestriker topic at: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3549245&action=view&brmode=1&fview=-1 User: sits Date: 04/11/03 14:05:44 Modified: bin log_accum.pl Log: The email field for the new topic should use $MAIL_FROM, not $user, since $MAIL_FROM will be a full email address. Index: log_accum.pl =================================================================== RCS file: /cvsroot/codestriker/codestriker/bin/log_accum.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- log_accum.pl 12 Oct 2004 10:13:38 -0000 1.5 +++ log_accum.pl 3 Nov 2004 22:05:43 -0000 1.6 @@ -346,7 +346,7 @@ project_name => $CODESTRIKER_PROJECT, repository => $CODESTRIKER_REPOSITORY, bug_ids => join(", ", @bugs), - email => $user, + email => $MAIL_FROM, reviewers => $CODESTRIKER_REVIEWERS, cc => $CODESTRIKER_CC, topic_text => join("\n", @diff) |
|
From: <si...@us...> - 2004-11-03 22:05:52
|
Topic "CVS commit: The email field for the new topic should use ..." Author: si...@us... Reviewers: cod...@li... URL: http://codestriker.sourceforge.net/cgi-bin/codestriker.pl?topic=3549245&action=view&brmode=1&fview=-1 -------------------------------------------------------------- Description: The email field for the new topic should use $MAIL_FROM, not $user, since $MAIL_FROM will be a full email address. -------------------------------------------------------------- The topic was created with the following files: codestriker/bin/log_accum.pl |