Thread: [Codestriker-commits] CVS update: codestriker/lib/Codestriker/Repository Subversion.pm
Brought to you by:
sits
|
From: <si...@us...> - 2006-07-12 00:07:22
|
User: sits
Date: 06/07/11 17:07:21
Modified: . CHANGELOG
lib Codestriker.pm
lib/Codestriker/Repository Subversion.pm
Log:
* Newer versions of the Subversion client (1.3.2) were returning
warning text that was not parsed correctly. This has now been
fixed. Contributed by Vladimir Sizikov <vsi...@gm...>.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.193
retrieving revision 1.194
diff -u -r1.193 -r1.194
--- CHANGELOG 4 Jul 2006 00:33:31 -0000 1.193
+++ CHANGELOG 12 Jul 2006 00:07:20 -0000 1.194
@@ -96,6 +96,10 @@
* Improved memory usage when integrated with very large LXR databases.
Contributed by Patrick Diamond <pat...@ma...>.
+* Newer versions of the Subversion client (1.3.2) were returning
+ warning text that was not parsed correctly. This has now been
+ fixed. Contributed by Vladimir Sizikov <vsi...@gm...>.
+
Version 1.9.1
* Correct problem introduced in 1.9.0 release where the email address
Index: Codestriker.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker.pm,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- Codestriker.pm 15 Jun 2006 06:46:18 -0000 1.93
+++ Codestriker.pm 12 Jul 2006 00:07:21 -0000 1.94
@@ -31,7 +31,7 @@
);
# Version of Codestriker.
-$Codestriker::VERSION = "1.9.2-alpha-9";
+$Codestriker::VERSION = "1.9.2-rc1";
# Default title to display on each Codestriker screen.
$Codestriker::title = "Codestriker $Codestriker::VERSION";
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Subversion.pm 7 Jun 2006 00:35:02 -0000 1.13
+++ Subversion.pm 12 Jul 2006 00:07:21 -0000 1.14
@@ -143,7 +143,7 @@
while(<$read_stderr_fh>) {
my $line = $_;
- if ($line =~ /^svn: URL '.*' refers to a directory/) {
+ if ($line =~ /^svn:.*URL '.*' refers to a directory/) {
$directory = $module_name;
}
}
|
|
From: <si...@us...> - 2007-03-07 03:03:41
|
User: sits
Date: 07/03/06 19:03:40
Modified: lib/Codestriker/FileParser SubversionDiff.pm
lib/Codestriker/Http Template.pm
lib/Codestriker/Repository Subversion.pm
Log:
Handle subversion diffs which contain non-latin characters
Index: SubversionDiff.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/SubversionDiff.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SubversionDiff.pm 26 May 2006 04:55:26 -0000 1.5
+++ SubversionDiff.pm 7 Mar 2007 03:03:40 -0000 1.6
@@ -112,19 +112,16 @@
# Try and read the base revision this change is against,
# while handling new and removed files.
my $base_revision = -1;
- if ($line =~ /^\-\-\- .*\s\(revision (\d+)\)/io ||
- $line =~ /^\-\-\- .*\s\(rev (\d+)/io) {
+ if ($line =~ /^\-\-\- .*\s.* (\d+)/io) {
$base_revision = $1;
- } elsif ($line !~ /^\-\-\- .*\s\(working copy\)/io) {
+ } elsif ($line !~ /^\-\-\- .*/io) {
return ();
}
# Make sure the +++ line is present next.
$line = <$fh>;
return () unless defined $line;
- if ($line !~ /^\+\+\+ .*\s\(working copy\)/io &&
- $line !~ /^\+\+\+ .*\s\(revision \d+\)/io &&
- $line !~ /^\+\+\+ .*\s\(txn .*\)/io) {
+ if ($line !~ /^\+\+\+ .*/io) {
return ();
}
Index: Template.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/Template.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Template.pm 11 Aug 2006 01:46:06 -0000 1.16
+++ Template.pm 7 Mar 2007 03:03:40 -0000 1.17
@@ -47,7 +47,7 @@
$config->{COMPILE_DIR} = $Codestriker::tmpdir;
}
- $self->{template} = Template->new($config) || die Template->error();
+ $self->{template} = Template->new($config) || die Template->error();
return bless $self, $type;
}
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Subversion.pm 12 Jul 2006 00:07:21 -0000 1.14
+++ Subversion.pm 7 Mar 2007 03:03:40 -0000 1.15
@@ -110,7 +110,7 @@
sub getDiff ($$$$$) {
my ($self, $start_tag, $end_tag, $module_name, $stdout_fh, $stderr_fh) = @_;
- # Make sure the moduel does not end or start with a /
+ # Make sure the module does not end or start with a /
$module_name =~ s/\/$//;
$module_name =~ s/^\///;
|
|
From: <si...@us...> - 2007-07-03 11:07:57
|
User: sits
Date: 07/07/03 04:07:51
Modified: . CHANGELOG
lib/Codestriker/Repository Subversion.pm
Log:
* Handle Subversion files which contain @ in the filename.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -r1.209 -r1.210
--- CHANGELOG 2 Jul 2007 09:54:09 -0000 1.209
+++ CHANGELOG 3 Jul 2007 11:07:50 -0000 1.210
@@ -33,6 +33,8 @@
of comment threads rather than the number of comments, when viewing
the topic text. This has now been fixed.
+* Handle Subversion files which contain @ in the filename.
+
Version 1.9.3
* The project list screen now displays for each project, the total
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Subversion.pm 3 Jul 2007 06:29:38 -0000 1.16
+++ Subversion.pm 3 Jul 2007 11:07:50 -0000 1.17
@@ -31,7 +31,9 @@
$repository_url =~ s/[\\\/]^//;
# Replace any spaces with %20 uri friendly escapes.
+ # Ditto with @ symbols, so Subversion doesn't interpret it as a peg.
$repository_url =~ s/ /%20/g;
+ $repository_url =~ s/\@/%40/g;
my $self = {};
$self->{repository_url} = $repository_url;
@@ -46,7 +48,9 @@
my ($self, $filename, $revision, $content_array_ref) = @_;
# Replace any spaces with %20 uri friendly escapes.
+ # Ditto with @ symbols, so Subversion doesn't interpret it as a peg.
$filename =~ s/ /%20/g;
+ $filename =~ s/\@/%40/g;
my $read_data;
my $read_stdout_fh = new FileHandle;
@@ -102,8 +106,10 @@
$module_name =~ s/^\///;
# Replace any spaces with %20 uri friendly escapes.
+ # Ditto with @ symbols, so Subversion doesn't interpret it as a peg.
my $filename = $module_name;
$filename =~ s/ /%20/g;
+ $filename =~ s/\@/%40/g;
my $write_stdin_fh = new FileHandle;
my $read_stdout_fh = new FileHandle;
@@ -126,9 +132,16 @@
my $directory;
# TODO: need a better way of detecting this, since Chinese users
- # receive a different output string. svn info might be better,
- # it can tell you if it is a file or directory.
- # svn propget svn:mime-type could be a way.
+ # receive a different output string. Kind is either a file or
+ # directory from what I have seen.
+ # C:\Program Files\svn-win32-1.4.4\bin>svn info --xml http://svn.collab.net/repos/svn/trunk/tools/README
+# <?xml version="1.0"?>
+# <info>
+# <entry
+# kind="file"
+# path="README"
+# revision="25631">
+# <url>http://svn.collab.net/repos/svn/trunk/tools/README</url>
# If there is an error about it being a directory, then use the
# module name as a directory.
|
|
From: <si...@us...> - 2007-10-24 10:09:41
|
User: sits
Date: 07/10/24 03:09:36
Modified: . CHANGELOG
lib/Codestriker/Repository Subversion.pm
Log:
* Allow the ability to specify just a filename (for the module field)
and a revision number (for the start or end tag) to create a review
for a specific version of a file in a subversion repository.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.217
retrieving revision 1.218
diff -u -r1.217 -r1.218
--- CHANGELOG 24 Sep 2007 22:45:16 -0000 1.217
+++ CHANGELOG 24 Oct 2007 10:09:36 -0000 1.218
@@ -1,6 +1,12 @@
*** When upgrading, don't forget to: "cd bin ; ./install.pl" ***
*** Also, it is _highly_ advisable to backup your data before upgrading ***
+Version 1.9.5
+
+* Allow the ability to specify just a filename (for the module field)
+ and a revision number (for the start or end tag) to create a review
+ for a specific version of a file in a subversion repository.
+
Version 1.9.4
* Emit a javascript warning if the external javascript files could
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Subversion.pm 12 Jul 2007 09:49:02 -0000 1.18
+++ Subversion.pm 24 Oct 2007 10:09:36 -0000 1.19
@@ -195,43 +195,85 @@
open($read_stdout_fh, '>', \$read_stdout_data);
my @args = ();
- push @args, 'diff';
- push @args, '--non-interactive';
- push @args, '--no-auth-cache';
- push @args, @{ $self->{userCmdLine} };
- push @args, '-r';
- push @args, $start_tag . ':' . $end_tag;
- push @args, '--old';
- push @args, $self->{repository_url};
- push @args, $module_name;
- Codestriker::execute_command($read_stdout_fh, $stderr_fh,
- $Codestriker::svn, @args);
-
- open($read_stdout_fh, '<', \$read_stdout_data);
- while(<$read_stdout_fh>) {
- my $line = $_;
+
+ my $revision;
+ if ($start_tag eq "" && $end_tag ne "") {
+ $revision = $end_tag;
+ } elsif ($start_tag ne "" && $end_tag eq "") {
+ $revision = $start_tag;
+ }
+
+ if (defined $revision) {
+ # Just pull out the actual contents of the file.
+ push @args, 'cat';
+ push @args, '--non-interactive';
+ push @args, '--no-auth-cache';
+ push @args, @{ $self->{userCmdLine} };
+ push @args, '-r';
+ push @args, $revision;
+ push @args, $self->{repository_url} . '/' . $module_name;
+ Codestriker::execute_command($read_stdout_fh, $stderr_fh,
+ $Codestriker::svn, @args);
+
+ open($read_stdout_fh, '<', \$read_stdout_data);
+ my $number_lines = 0;
+ while(<$read_stdout_fh>) {
+ $number_lines++;
+ }
+ Codestriker::execute_command($read_stdout_fh, $stderr_fh,
+ $Codestriker::svn, @args);
+
+ open($read_stdout_fh, '<', \$read_stdout_data);
+
+
+ # Fake the diff header.
+ print $stdout_fh "Index: $module_name\n";
+ print $stdout_fh "===================================================================\n";
+ print $stdout_fh "--- /dev/null\n";
+ print $stdout_fh "+++ $module_name\t(revision $revision)\n";
+ print $stdout_fh "@@ -0,0 +1,$number_lines @@\n";
+ while(<$read_stdout_fh>) {
+ print $stdout_fh "+ $_";
+ }
+ } else {
+ push @args, 'diff';
+ push @args, '--non-interactive';
+ push @args, '--no-auth-cache';
+ push @args, @{ $self->{userCmdLine} };
+ push @args, '-r';
+ push @args, $start_tag . ':' . $end_tag;
+ push @args, '--old';
+ push @args, $self->{repository_url};
+ push @args, $module_name;
+ Codestriker::execute_command($read_stdout_fh, $stderr_fh,
+ $Codestriker::svn, @args);
- # If the user specifies a path (a branch in Subversion), the
- # diff file does not come back with a path rooted from the
- # repository base making it impossible to pull the entire file
- # back out. This code attempts to change the diff file on the
- # fly to ensure that the full path is present. This is a bug
- # against Subversion, so eventually it will be fixed, so this
- # code can't break when the diff command starts returning the
- # full path.
- if ($line =~ /^--- / || $line =~ /^\+\+\+ / ||
- $line =~ /^Index: /) {
- # Check if the bug has been fixed.
- if ($line =~ /^\+\+\+ $module_name/ == 0 &&
- $line =~ /^--- $module_name/ == 0 &&
- $line =~ /^Index: $module_name/ == 0) {
+ open($read_stdout_fh, '<', \$read_stdout_data);
+ while(<$read_stdout_fh>) {
+ my $line = $_;
+
+ # If the user specifies a path (a branch in Subversion), the
+ # diff file does not come back with a path rooted from the
+ # repository base making it impossible to pull the entire file
+ # back out. This code attempts to change the diff file on the
+ # fly to ensure that the full path is present. This is a bug
+ # against Subversion, so eventually it will be fixed, so this
+ # code can't break when the diff command starts returning the
+ # full path.
+ if ($line =~ /^--- / || $line =~ /^\+\+\+ / ||
+ $line =~ /^Index: /) {
+ # Check if the bug has been fixed.
+ if ($line =~ /^\+\+\+ $module_name/ == 0 &&
+ $line =~ /^--- $module_name/ == 0 &&
+ $line =~ /^Index: $module_name/ == 0) {
$line =~ s/^--- /--- $directory\// or
- $line =~ s/^Index: /Index: $directory\// or
- $line =~ s/^\+\+\+ /\+\+\+ $directory\//;
+ $line =~ s/^Index: /Index: $directory\// or
+ $line =~ s/^\+\+\+ /\+\+\+ $directory\//;
+ }
}
- }
- print $stdout_fh $line;
+ print $stdout_fh $line;
+ }
}
return $Codestriker::OK;
|
|
From: <si...@us...> - 2008-06-13 05:55:17
|
User: sits
Date: 08/06/12 22:55:14
Modified: lib/Codestriker/Http DeltaRenderer.pm LxrLineFilter.pm
. CHANGELOG
lib/Codestriker/Repository Subversion.pm
Log:
* Added support for LXR 0.9.5, which renamed the database tables to
contain an lxr_ prefix by default. Support for older LXR databases
will still work by default.
Index: DeltaRenderer.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/DeltaRenderer.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DeltaRenderer.pm 11 Jun 2008 12:00:31 -0000 1.5
+++ DeltaRenderer.pm 13 Jun 2008 05:55:12 -0000 1.6
@@ -58,11 +58,11 @@
@{$self->{line_filters}} = ();
push @{$self->{line_filters}}, Codestriker::Http::HtmlEntityLineFilter->new();
+ push @{$self->{line_filters}}, Codestriker::Http::TabToNbspLineFilter->new($tabwidth);
+ push @{$self->{line_filters}}, Codestriker::Http::LineBreakLineFilter->new($brmode);
if (defined $lxr_config) {
push @{$self->{line_filters}}, Codestriker::Http::LxrLineFilter->new($lxr_config);
}
- push @{$self->{line_filters}}, Codestriker::Http::TabToNbspLineFilter->new($tabwidth);
- push @{$self->{line_filters}}, Codestriker::Http::LineBreakLineFilter->new($brmode);
bless $self, $type;
}
@@ -315,7 +315,6 @@
my ($self, $text) = @_;
# TODO: perform syntax highlighting.
- # TODO: perform LXR linking.
foreach my $line_filter (@{$self->{line_filters}}) {
$text = $line_filter->filter($text);
}
Index: LxrLineFilter.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/LxrLineFilter.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LxrLineFilter.pm 11 Jun 2008 12:00:31 -0000 1.1
+++ LxrLineFilter.pm 13 Jun 2008 05:55:13 -0000 1.2
@@ -16,6 +16,8 @@
@Codestriker::Http::LxrLineFilter::ISA =
("Codestriker::Http::LineFilter");
+
+# TODO: close the database handle correctly.
# Take the LXR configuration as a parameter and create a connection to the LXR database
# for symbol lookup.
@@ -32,21 +34,25 @@
$lxr_config->{password} : $lxr_config->{passwd};
$self->{dbh} = DBI->connect($lxr_config->{db}, $lxr_config->{user},
$password,
- {AutoCommit=>0, RaiseError=>1})
+ {AutoCommit=>0, RaiseError=>0, PrintError=>0})
|| die "Couldn't connect to LXR database: " . DBI->errstr;
# Create the appropriate prepared statement for retrieving LXR symbols.
# Depending on the LXR deployment, the table name is either "symbols"
- # or "lxr_symbols".
- eval
- {
- $self->{select_ids} =
+ # or "lxr_symbols". Try to determine this silently.
+ $self->{select_ids} =
$self->{dbh}->prepare_cached('SELECT count(symname) FROM symbols where symname = ?');
- };
- if ($@) {
+ my $success = defined $self->{select_ids};
+ $success &&= $self->{select_ids}->execute('test');
+ $success &&= $self->{select_ids}->finish;
+ if (! $success) {
$self->{select_ids} =
$self->{dbh}->prepare_cached('SELECT count(symname) FROM lxr_symbols where symname = ?');
- }
+ }
+
+ # Re-enable error reporting again.
+ $self->{dbh}->{RaiseError} = 1;
+ $self->{dbh}->{PrintError} = 1;
# Cache for storing which IDs have been found.
$self->{idhash} = {};
@@ -79,7 +85,7 @@
# Check if the id has been found in lxr.
if ($count > 0) {
- return '<a href=\"' . $self->{url} . $id . '\" class=\"fid\">' . $id . '</a>';
+ return '<a href="' . $self->{url} . $id . '" class="fid">' . $id . '</a>';
} else {
return $id;
}
@@ -123,6 +129,7 @@
$newdata .= $token;
} elsif ($token eq "nbsp" || $token eq "quot" || $token eq "amp" ||
$token eq "lt" || $token eq "gt") {
+ # TODO: is this still needed?
# HACK - ignore potential HTML entities. This needs to be
# done in a smarter fashion later.
$newdata .= $token;
@@ -147,4 +154,15 @@
return $newdata;
}
+# Ensure the prepared statements and database connection to LXR is closed.
+sub DESTROY {
+ my ($self) = @_;
+
+ $self->SUPER::DESTROY if $self->can("SUPER::DESTROY");
+
+ $self->{select_ids}->finish;
+ $self->{dbh}->disconnect;
+}
+
+
1;
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.226
retrieving revision 1.227
diff -u -r1.226 -r1.227
--- CHANGELOG 11 Jun 2008 07:05:22 -0000 1.226
+++ CHANGELOG 13 Jun 2008 05:55:13 -0000 1.227
@@ -33,7 +33,11 @@
rob...@us....
* The edit comment page has been updated so that the topic name is
- linked back to the associated view topic page.
+ linked back to the associated view topic page.
+
+* Added support for LXR 0.9.5, which renamed the database tables to
+ contain an lxr_ prefix by default. Support for older LXR databases
+ will still work by default.
Version 1.9.4
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Subversion.pm 24 Oct 2007 10:09:36 -0000 1.19
+++ Subversion.pm 13 Jun 2008 05:55:13 -0000 1.20
@@ -108,7 +108,7 @@
# Return a string representation of this repository.
sub toString ($) {
my ($self) = @_;
- return "svn:" . $self->getRoot();
+ return $self->{repository_string};
}
# Given a Subversion URL, determine if it refers to a directory or a file.
|
|
From: <si...@us...> - 2008-06-18 04:47:15
|
User: sits
Date: 08/06/17 21:47:14
Modified: lib/Codestriker/Http DeltaRenderer.pm HighlightLineFilter.pm
LineBreakLineFilter.pm
html codestriker.css
lib/Codestriker/Repository Subversion.pm
Log:
More highlighting changes.
Index: DeltaRenderer.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/DeltaRenderer.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DeltaRenderer.pm 17 Jun 2008 11:50:59 -0000 1.9
+++ DeltaRenderer.pm 18 Jun 2008 04:47:13 -0000 1.10
@@ -56,11 +56,12 @@
# code to html.
@{$self->{line_filters}} = ();
if (defined $Codestriker::highlighter && $Codestriker::highlighter ne '') {
- push @{$self->{line_filters}}, Codestriker::Http::HighlightLineFilter->new($Codestriker::highlighter);
+ push @{$self->{line_filters}}, Codestriker::Http::HighlightLineFilter->new($Codestriker::highlighter, $tabwidth);
+ push @{$self->{line_filters}}, Codestriker::Http::LineBreakLineFilter->new($brmode, 1);
} else {
push @{$self->{line_filters}}, Codestriker::Http::HtmlEntityLineFilter->new();
push @{$self->{line_filters}}, Codestriker::Http::TabToNbspLineFilter->new($tabwidth);
- push @{$self->{line_filters}}, Codestriker::Http::LineBreakLineFilter->new($brmode);
+ push @{$self->{line_filters}}, Codestriker::Http::LineBreakLineFilter->new($brmode, 0);
my $lxr_config = defined $repository ?
$Codestriker::lxr_map->{$repository->toString()} : undef;
if (defined $lxr_config) {
@@ -108,7 +109,7 @@
# Determine what comment number this anchor refers to.
$comment_number = $comment_location_map{$anchor};
$text = $query->span({-id=>"c$comment_number"}, "") .
- $query->span({-class=>"com"}, $text);
+ $query->span({-class=>"comment"}, $text);
# Determine what the next comment in line is.
my $index = -1;
Index: HighlightLineFilter.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/HighlightLineFilter.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- HighlightLineFilter.pm 17 Jun 2008 11:09:34 -0000 1.2
+++ HighlightLineFilter.pm 18 Jun 2008 04:47:13 -0000 1.3
@@ -21,10 +21,11 @@
# Take the desired tabwidth as a parameter.
sub new {
- my ($type, $highlight) = @_;
+ my ($type, $highlight, $tabwidth) = @_;
my $self = Codestriker::Http::LineFilter->new();
$self->{highlight} = $highlight;
+ $self->{tabwidth} = $tabwidth;
return bless $self, $type;
}
@@ -39,7 +40,7 @@
close $input_text_fh;
# Execute the highlight command, and store the stdout into $read_data.
- my $read_data;
+ my $read_data = "";
my $read_stdout_fh = new FileHandle;
open($read_stdout_fh, '>', \$read_data);
my @args = ();
@@ -47,6 +48,8 @@
push @args, $input_filename;
push @args, '--xhtml';
push @args, '-f';
+ push @args, '-t';
+ push @args, $self->{tabwidth};
Codestriker::execute_command($read_stdout_fh, undef, $self->{highlight}, @args);
# Delete the temp file.
Index: LineBreakLineFilter.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Http/LineBreakLineFilter.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LineBreakLineFilter.pm 16 Jun 2008 11:32:05 -0000 1.2
+++ LineBreakLineFilter.pm 18 Jun 2008 04:47:13 -0000 1.3
@@ -19,10 +19,11 @@
# Take the linebreak mode as a parameter.
sub new {
- my ($type, $brmode) = @_;
+ my ($type, $brmode, $inspan) = @_;
my $self = Codestriker::Http::LineFilter->new();
$self->{brmode} = $brmode;
+ $self->{inspan} = $inspan;
return bless $self, $type;
}
@@ -32,10 +33,22 @@
my ($self, $text) = @_;
if ($self->{brmode} == $Codestriker::LINE_BREAK_ASSIST_MODE) {
- $text =~ s/^(\s+)/my $sp='';for(my $i=0;$i<length($1);$i++){$sp.=' '}$sp;/ge;
+ # TODO: fix this for highlighted version.
+ $text =~ s/^(\s+)/my $sp='';for(my $i=0;$i<length($1);$i++){$sp.=' '}$sp;/ge;
}
else {
- $text =~ s/ / /g;
+ if ($self->{inspan}) {
+ my @lines = split /\n/, $text;
+ my $result = "";
+ foreach my $line (@lines) {
+ $line =~ s/^( [ ]+)/(' ' x length($1))/eo;
+ $line =~ s/(>[^<]*?)( [ ]+)/$1 . (' ' x length($2))/eog;
+ $result .= $line . "\n";
+ }
+ $text = $result;
+ } else {
+ $text =~ s/ / /g;
+ }
}
return $text;
Index: codestriker.css
===================================================================
RCS file: /cvsroot/codestriker/codestriker/html/codestriker.css,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- codestriker.css 17 Jun 2008 11:09:35 -0000 1.18
+++ codestriker.css 18 Jun 2008 04:47:14 -0000 1.19
@@ -64,7 +64,7 @@
TD.mscb {background-color: #eeee77; font-family: monospace; font-size: smaller}
/* Line number with comment */
-SPAN.com {color: #ff0000; font-family: Helvetica, Arial; font-size: smaller}
+SPAN.comment {color: #ff0000; font-family: Helvetica, Arial; font-size: smaller}
/* Line number with no comment */
SPAN.nocom {font-family: Helvetica, Arial; font-size: smaller}
@@ -113,7 +113,6 @@
TR.tl2 {background-color: #eeeeee; font-family: Helvetica, Arial}
/* Colour to use for matching identifier */
-/* A.fid {color: #777777; text-decoration: none} */
A.fid:link { color: inherit; text-decoration: none }
A.fid:visited { color: inherit; text-decoration: none }
A.fid:visited:hover { text-decoration: underline; }
@@ -162,18 +161,17 @@
span.obsolete-header {color: red; font-weight: bold;}
/* Styles for highlight program. */
-pre.hl { color:#000000; background-color:#ffffff; font-size:10pt; font-family:'Courier New';}
-.hl.num { color:#2928ff; }
-.hl.esc { color:#ff00ff; }
-.hl.str { color:#ff0000; }
-.hl.dstr { color:#818100; }
-.hl.slc { color:#838183; font-style:italic; }
-.hl.com { color:#838183; font-style:italic; }
+.hl.num { color:#0000ff; }
+.hl.esc { color:#000080; font-weight:bold; }
+.hl.str { color:#008000; }
+.hl.dstr { color:#008000; }
+.hl.slc { color:#008080; }
+.hl.com { color:#008080; }
.hl.dir { color:#008200; }
.hl.sym { color:#000000; }
.hl.line { color:#555555; }
.hl.mark { background-color:#ffffbb;}
-.hl.kwa { color:#000000; font-weight:bold; }
-.hl.kwb { color:#830000; }
-.hl.kwc { color:#000000; font-weight:bold; }
-.hl.kwd { color:#010181; }
\ No newline at end of file
+.hl.kwa { color:#000080; font-weight:bold; }
+.hl.kwb { color:#000080; font-weight:bold; }
+.hl.kwc { color:#000000; }
+.hl.kwd { color:#000000; }
\ No newline at end of file
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Subversion.pm 13 Jun 2008 05:55:13 -0000 1.20
+++ Subversion.pm 18 Jun 2008 04:47:14 -0000 1.21
@@ -84,6 +84,8 @@
chop;
$$content_array_ref[$i] = $_;
}
+
+ return $Codestriker::OK;
}
# Retrieve the "root" of this repository.
|
|
From: <si...@us...> - 2008-07-11 23:12:51
|
User: sits
Date: 08/07/11 16:12:50
Modified: . CHANGELOG
lib/Codestriker/Repository Subversion.pm
Log:
* Creation of Subversion topics which use a file for the module field
in the create topic screen may not work correctly for some versions
of Subversion. This has now been fixed by
rob...@us....
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -r1.244 -r1.245
--- CHANGELOG 11 Jul 2008 09:50:21 -0000 1.244
+++ CHANGELOG 11 Jul 2008 23:12:50 -0000 1.245
@@ -11,7 +11,12 @@
Perl 5.10 from rob...@us....
* Deleting a topic connected with a TestDirector bug has been fixed
- from rob...@us....
+ by rob...@us....
+
+* Creation of Subversion topics which use a file for the module field
+ in the create topic screen may not work correctly for some versions
+ of Subversion. This has now been fixed by
+ rob...@us....
* Ability to parse git patches correctly.
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- Subversion.pm 18 Jun 2008 04:47:14 -0000 1.21
+++ Subversion.pm 11 Jul 2008 23:12:50 -0000 1.22
@@ -135,7 +135,7 @@
open($read_stdout_fh, '<', \$read_data);
while (<$read_stdout_fh>) {
if (/kind\s*\=\s*\"(\w+)\"/) {
- $file_url = $1 eq "File";
+ $file_url = $1 =~ /^File$/io;
last;
}
}
|
|
From: <si...@us...> - 2008-08-06 05:24:45
|
User: sits
Date: 08/08/05 22:24:43
Modified: . CHANGELOG
lib/Codestriker/Repository Subversion.pm
Log:
* Use pegged revisions instead of operative revisions when retrieving
files from Subversion to handle situations where files have been moved
within the repository since the review was created. Fixed by
cle...@us....
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -r1.253 -r1.254
--- CHANGELOG 5 Aug 2008 10:45:12 -0000 1.253
+++ CHANGELOG 6 Aug 2008 05:24:42 -0000 1.254
@@ -43,7 +43,12 @@
* Make the topic title in the edit comment page link directly to the
code location being commented on rather than just the top of the
- view topic page.
+ view topic page.
+
+* Use pegged revisions instead of operative revisions when retrieving
+ files from Subversion to handle situations where files have been moved
+ within the repository since the review was created. Fixed by
+ cle...@us....
Version 1.9.5
Index: Subversion.pm
===================================================================
RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/Repository/Subversion.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- Subversion.pm 3 Aug 2008 01:59:55 -0000 1.23
+++ Subversion.pm 6 Aug 2008 05:24:43 -0000 1.24
@@ -71,9 +71,7 @@
push @args, '--non-interactive';
push @args, '--no-auth-cache';
push @args, @{ $self->{userCmdLine} };
- push @args, '--revision';
- push @args, $revision;
- push @args, $self->{repository_url} . '/' . $filename;
+ push @args, $self->{repository_url} . '/' . $filename . '@' . $revision;
Codestriker::execute_command($read_stdout_fh, undef,
$Codestriker::svn, @args);
|