emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C-x v a doesn't show author correctly (lib-src/rcs2log)


From: Jhair Tocancipa Triana
Subject: C-x v a doesn't show author correctly (lib-src/rcs2log)
Date: Sun, 17 Jun 2007 00:46:12 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux)

Could someone please install the patch below? Some versions of cvs
include the numeric timezone in the output of cvs -q log and in those
cases entries like

date: 2006-06-05 20:49:31 +0200;  author: jtocancipa;  state: Exp;  lines: +321 
-99;

don't get parsed correctly.

TIA,


--- rcs2log     26 Jan 2007 07:15:59 +0100      1.50.10.6
+++ rcs2log     17 Jun 2007 00:30:11 +0200      
@@ -451,9 +451,16 @@
 esac >$llogout || exit
 
 output_authors='/^date: / {
-       if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ 
/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ 
/^[^;]*;$/) {
-               print substr($5, 1, length($5)-1)
-       }
+          # old date format
+          if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ 
/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ 
/^[^;]*;$/) {
+                          print substr($5, 1, length($5)-1)
+          }
+          else {
+                          # new date format
+                          if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && 
$3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*$/ && $5 == "author:" && $6 ~ 
/^[^;]*;$/) {
+                                          print substr($6, 1, length($6)-1)
+                          }
+               }
 }'
 authors=`
        $AWK "$output_authors" <"$rlogfile" | sort -u | comm -23 - $llogout
@@ -646,6 +653,10 @@
                        }
                        time = substr($3, 1, length($3) - 1)
                        author = substr($5, 1, length($5)-1)
+                       if (author ~ /author/) {
+                               # new date format
+                               author = substr($6, 1, length($6)-1)
+                       }
                        printf "%s%s%s%s%s%s%s%s%s%s", filename, SOH, rev, SOH, 
date, SOH, time, SOH, author, SOH
                        rev = "?"
                        next





reply via email to

[Prev in Thread] Current Thread [Next in Thread]