User: sits
Date: 08/09/26 21:27:28
Modified: lib/Codestriker/TopicListeners Email.pm
Log:
Only show context line in emails if the context is actually available.
Index: Email.pm
===================================================================
RCS file:
/cvsroot/codestriker/codestriker/lib/Codestriker/TopicListeners/Email.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- Email.pm 6 Sep 2008 00:31:50 -0000 1.36
+++ Email.pm 27 Sep 2008 04:27:27 -0000 1.37
@@ -395,10 +395,6 @@
if ($comment->{fileline} != -1) {
$body .= " line $comment->{fileline}.\n\n";
- # Only show the context for a comment made against a specific line.
- $body .= "Context:\n$EMAIL_HR\n\n";
- my $email_context = $Codestriker::EMAIL_CONTEXT;
-
# Retrieve the diff hunk for this file and line number.
my $delta =
Codestriker::Model::Delta->get_delta($comment->{topicid},
@@ -407,6 +403,11 @@
$comment->{filenew});
if (defined $delta) {
+ # Only show the context for a comment made against a specific
line
+ # in the original review text.
+ $body .= "Context:\n$EMAIL_HR\n\n";
+ my $email_context = $Codestriker::EMAIL_CONTEXT;
+
my @text = ();
my $offset = $delta->retrieve_context($comment->{fileline},
$comment->{filenew},
$email_context, [EMAIL
PROTECTED]);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits