OSSP CVS Repository

ossp - Check-in [3013]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3013
Date: 2002-Dec-22 18:10:26 (local)
2002-Dec-22 17:10:26 (UTC)
User:rse
Branch:
Comment: 1. Add branch information to the Subject lines of generated Emails. Additionally, for better readability, use a trailing slash on directory names in the Subject lines of generated Emails.

2. Use Cwd::abs_path instead of Cwd::realpath because the latter is not available in older Cwd.pm versions (as those distributed with Perl 5.005, etc).

Tickets:
Inspections:
Files:
ossp-pkg/shiela/ChangeLog      1.20 -> 1.21     5 inserted, 0 deleted
ossp-pkg/shiela/shiela.pl      1.33 -> 1.34     11 inserted, 3 deleted

ossp-pkg/shiela/ChangeLog 1.20 -> 1.21

--- ChangeLog    2002/12/22 16:30:14     1.20
+++ ChangeLog    2002/12/22 17:10:26     1.21
@@ -10,6 +10,11 @@
   ChangeLog
 
   Changes between 0.9.2 and 0.9.3 (19-Aug-2002 to 21-Dec-2002):
+   
+   *) Add branch information to the Subject lines of generated Emails.
+      Additionally, for better readability, use a trailing slash on
+      directory names in the Subject lines of generated Emails.
+      [Ralf S. Engelschall]
 
    *) Line-break single-line log messages into multi-line log messages
       to make the usual log messages produced by "cvs commit -m '...'"


ossp-pkg/shiela/shiela.pl 1.33 -> 1.34

--- shiela.pl    2002/12/22 16:30:14     1.33
+++ shiela.pl    2002/12/22 17:10:26     1.34
@@ -36,7 +36,7 @@
 use IO::Handle;   # shipped with Perl since 5.003
 use IPC::Open2;   # shipped with Perl since 5.003
 use Data::Dumper; # shipped with Perl since 5.005
-use Cwd;          # shipped with Perl since 5.003
+use Cwd;          # shipped with Perl since 5.005
 
 #   DEBUGGING
 $Data::Dumper::Purity = 1;
@@ -1036,7 +1036,7 @@
 
     #   strip absolute prefix
     $cvsdir =~ s|^$RT->{cvsroot}/?||;
-    my $cvsdirphysical = Cwd::realpath($RT->{cvsroot});
+    my $cvsdirphysical = Cwd::abs_path($RT->{cvsroot});
     $cvsdir =~ s|^$cvsdirphysical/?||;
 
     #   provide access control
@@ -1992,11 +1992,19 @@
                 my $subject = "[CVS]";
                 $subject .= " ".$CF->{Project}->{Tag}.":";
                 my $dirlast = '';
+                my $branchlast = '';
                 foreach my $path (sort(keys(%{$IN->{file}}))) {
                     my ($dir, $file) = ($path =~ m|^(.+)/([^/]+)$|);
+                    my $branch = $IN->{file}->{$path}->{branch} || 'HEAD';
+                    if ($branchlast ne $branch) {
+                        #   prefix with branch
+                        $branchlast = $branch;
+                        $subject .= " $branch:" if ($branch ne 'HEAD');
+                    }
                     if ($dirlast ne $dir) {
+                        #   prefix with directory
                         $dirlast = $dir;
-                        $subject .= " $dir";
+                        $subject .= " $dir/";
                     }
                     $subject .= " $file";
                 }

CVSTrac 2.0.1