Package: cvs-mailcommit
Version: 1.19-2
Severity: normal
Tags: patch

Diffs are not generated for files which only exist on a branch, i.e.
stored in the Attic directory.  Because rcsdiff and co are being called
directly on the RCS files, cvs-mailcommit needs to know to look in the
Attic if the file doesn't exist in the directory specified by %p.

Christian

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.15-1-686-smp
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages cvs-mailcommit depends on:
ii  exim4-daemon-heavy [mail-tran 4.50-8     exim MTA (v4) daemon with extended
ii  rcs                           5.7-15     The GNU Revision Control System

-- no debconf information
--- cvs-mailcommit.orig 2006-05-17 16:50:05.000000000 -0700
+++ /usr/bin/cvs-mailcommit     2006-05-17 17:51:50.000000000 -0700
@@ -262,6 +262,9 @@
            ($file,$oldver,$newver) = split (/,/,$cstr);
            next if ($oldver eq "" || $newver eq "");
            if ($oldver ne "NONE") {
+               if (! -f "$module_dir/$file,v" && -f 
"$module_dir/Attic/$file,v") {
+                   $file = "Attic/$file";      
+               }
                # print "$rcsdiff -r$oldver -r$newver -u $module_dir/$file|\n";
                if (open (R, "$rcsdiff -r$oldver -r$newver -u $module_dir/$file 
2>/dev/null |")) {
                    $lines = 0;
@@ -281,7 +284,7 @@
        print  M "\n";
        foreach $cstr (@cvs_arr) {
            ($file,$oldver,$newver) = split (/,/,$cstr);
-           next if ($oldver ne "NONE" || $newver ne "1.1");
+           next if ($oldver ne "NONE");
 
            my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)
                = gmtime(time);
@@ -289,6 +292,9 @@
            my $date = sprintf ("%4d/%02d/%02d %02d:%02d:%02d",
                                $year+1900, $mon+1, $mday, $hour,$min,$sec);
 
+           if (! -f "$module_dir/$file,v" && -f "$module_dir/Attic/$file,v") {
+               $file = "Attic/$file";  
+           }
            if (open (R, "$co -p -r$newver $module_dir/$file 2>/dev/null |")) {
                printf M "--- %s/%s\t%s\tNONE\n", $module_dir, $file, $date;
                printf M "+++ %s/%s\t%s\t%s\n", $module_dir, $file, $date, 
$newver;

Reply via email to