User: sits
Date: 07/08/25 02:11:08
Modified: . CHANGELOG
lib/Codestriker/Action ViewTopicProperties.pm
lib/Codestriker/FileParser PerforceDescribe.pm
lib/Codestriker/BugDB BugDBConnectionFactory.pm
Added: lib/Codestriker/BugDB NoConnection.pm
Log:
* Handle the different text types that may be present in a Perforce diff.
Submitted by Russell Cattelan <[EMAIL PROTECTED]>.
* Defined the "noconnection" option for $bug_db in codestriker.conf
so that it is possible to define what bug IDs are associated with
a topic, without updating an actual bug database when the topic
is created/closed. If $bugtracker is defined in codestriker.conf,
then links will be created on the topic properties screen to the
associated bug records. Submitted by Russell Cattelan
<[EMAIL PROTECTED]>.
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -r1.214 -r1.215
--- CHANGELOG 25 Aug 2007 06:23:12 -0000 1.214
+++ CHANGELOG 25 Aug 2007 09:11:06 -0000 1.215
@@ -52,6 +52,17 @@
locale. See http://marc.info/?l=subversion-users&m=118725115412403&w=3
for more information.
+* Handle the different text types that may be present in a Perforce diff.
+ Submitted by Russell Cattelan <[EMAIL PROTECTED]>.
+
+* Defined the "noconnection" option for $bug_db in codestriker.conf
+ so that it is possible to define what bug IDs are associated with
+ a topic, without updating an actual bug database when the topic
+ is created/closed. If $bugtracker is defined in codestriker.conf,
+ then links will be created on the topic properties screen to the
+ associated bug records. Submitted by Russell Cattelan
+ <[EMAIL PROTECTED]>.
+
Version 1.9.3
* The project list screen now displays for each project, the total
Index: ViewTopicProperties.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/Action/ViewTopicProperties.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ViewTopicProperties.pm 15 Jan 2006 21:20:05 -0000 1.13
+++ ViewTopicProperties.pm 25 Aug 2007 09:11:07 -0000 1.14
@@ -85,7 +85,7 @@
$vars->{'bug_ids'} = $topic->{bug_ids};
if (defined $topic->{bug_ids} && $topic->{bug_ids} ne "" &&
defined $Codestriker::bugtracker) {
- my @bug_id_array = split ',', $topic->{bug_ids};
+ my @bug_id_array = split /[\s,]+/, $topic->{bug_ids};
$vars->{'bug_id_array'} = [EMAIL PROTECTED];
$vars->{'bugtracker'} = $Codestriker::bugtracker;
}
Index: PerforceDescribe.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/PerforceDescribe.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PerforceDescribe.pm 24 Jul 2005 09:49:48 -0000 1.5
+++ PerforceDescribe.pm 25 Aug 2007 09:11:07 -0000 1.6
@@ -122,7 +122,7 @@
$line = <$fh>;
next unless defined $line;
- if ($filetype eq "text") {
+ if ($filetype =~ /.*text/) {
# Now read the entire diff chunk.
# Note there may be an optional '---' and '+++' lines
# before the chunk.
Index: BugDBConnectionFactory.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/BugDB/BugDBConnectionFactory.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BugDBConnectionFactory.pm 22 May 2005 10:46:32 -0000 1.3
+++ BugDBConnectionFactory.pm 25 Aug 2007 09:11:07 -0000 1.4
@@ -12,6 +12,7 @@
use strict;
use Codestriker::BugDB::BugzillaConnection;
use Codestriker::BugDB::FlysprayConnection;
+use Codestriker::BugDB::NoConnection;
# Factory method for retrieving a BugDBConnection object.
sub getBugDBConnection ($) {
@@ -22,6 +23,8 @@
return Codestriker::BugDB::BugzillaConnection->get_connection();
} elsif ($dbtype eq "flyspray") {
return Codestriker::BugDB::FlysprayConnection->get_connection();
+ } elsif ($dbtype =~ /^noconnect/) {
+ return Codestriker::BugDB::NoConnection->get_connection();
} else {
die "Unsupported bug database type: $dbtype";
}
Index: NoConnection.pm
===================================================================
RCS file: NoConnection.pm
diff -N NoConnection.pm
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ NoConnection.pm 25 Aug 2007 09:11:07 -0000 1.1
@@ -0,0 +1,38 @@
+###############################################################################
+# Codestriker: Copyright (c) 2001, 2002 David Sitsky. All rights reserved.
+# [EMAIL PROTECTED]
+#
+# This program is free software; you can redistribute it and modify it under
+# the terms of the GPL.
+
+# Connection class which actually doesn't connect to a real bug database.
+# All methods are no-ops.
+
+package Codestriker::BugDB::NoConnection;
+
+use strict;
+use DBI;
+
+# Static method for building a database connection.
+sub get_connection($) {
+ my ($type) = @_;
+ my $self = {};
+ bless $self, $type;
+}
+
+# Method for releasing a database connection.
+sub release_connection($) {
+}
+
+# Return true if the specified bugid exists in the bug database,
+# false otherwise.
+sub bugid_exists($$) {
+ return 1;
+}
+
+# Method for updating the bug with information that a code review has been
+# created/closed/committed against this bug.
+sub update_bug($$$$) {
+}
+
+1;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits