--- F:/AmezaBackup/Projects/codestriker-1.9.7/lib/Codestriker/Repository/Perforce.pm	Thu Sep 11 16:55:44 2008
+++ F:/AmezaBackup/Projects/codestriker-1.9.7MOd/lib/Codestriker/Repository/Perforce.pm	Mon Jan 05 12:20:00 2009
@@ -67,18 +67,26 @@
     my ($self, $start_tag, $end_tag, $module_name,
         $stdout_fh, $stderr_fh) = @_;
 
-    # Currently diff retrievals are only supported for a single tag.
-    if ($start_tag ne '' && $end_tag ne '') {
-        print $stderr_fh, "Diff retrieval cannot be performed with both tags defined.\n";
-        return $Codestriker::OK;
-    }
-    my $tag = $start_tag ne '' ? $start_tag : $end_tag;
+    # Diff retrievals are now supported for a multiple tag at the same module
+    if ($start_tag ne '' && $end_tag ne '' && $start_tag ne $end_tag) {
+        # Way to do it for CL range at same branch
+        #"p4 diff2 -u $module_name...\@$start_tag $module_name...\@$end_tag";
+        my $revRange = "$module_name...\@$start_tag $module_name...\@$end_tag";
 
-    Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
-                                 '-p', $self->{hostname} . ':' . $self->{port},
-                                 '-u', $self->{user},
-                                 '-P', $self->{password}, 'describe',
-                                 '-du', $tag);
+        Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
+                                     '-p', $self->{hostname} . ':' . $self->{port},
+                                     '-u', $self->{user},
+                                     '-P', $self->{password}, 'diff2',
+                                     '-du', $revRange);
+    }
+    else {
+        my $tag = $start_tag ne '' ? $start_tag : $end_tag;
+        Codestriker::execute_command($stdout_fh, $stderr_fh, $Codestriker::p4,
+                                     '-p', $self->{hostname} . ':' . $self->{port},
+                                     '-u', $self->{user},
+                                     '-P', $self->{password}, 'describe',
+                                     '-du', $tag);
+    }
     return $Codestriker::OK;
 }
 
