From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jhair Tocancipa Triana Newsgroups: gmane.emacs.devel Subject: C-x v a doesn't show author correctly (lib-src/rcs2log) Date: Sun, 17 Jun 2007 00:46:12 +0200 Organization: Golem - Debian laptop at home Message-ID: <87wsy3zfez.fsf@mandala.my-fqdn.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1182033997 13479 80.91.229.12 (16 Jun 2007 22:46:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Jun 2007 22:46:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 17 00:46:36 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hzh2R-0006EA-Qq for ged-emacs-devel@m.gmane.org; Sun, 17 Jun 2007 00:46:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hzh2R-00040Y-Br for ged-emacs-devel@m.gmane.org; Sat, 16 Jun 2007 18:46:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hzh2O-00040S-Q5 for emacs-devel@gnu.org; Sat, 16 Jun 2007 18:46:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hzh2M-00040G-5A for emacs-devel@gnu.org; Sat, 16 Jun 2007 18:46:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hzh2M-00040D-2E for emacs-devel@gnu.org; Sat, 16 Jun 2007 18:46:30 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hzh2L-0007Oq-Lz for emacs-devel@gnu.org; Sat, 16 Jun 2007 18:46:29 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Hzh2D-0006jw-29 for emacs-devel@gnu.org; Sun, 17 Jun 2007 00:46:21 +0200 Original-Received: from pd9e9e431.dip.t-dialin.net ([217.233.228.49]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jun 2007 00:46:21 +0200 Original-Received: from jhair.tocancipa by pd9e9e431.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 17 Jun 2007 00:46:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pd9e9e431.dip.t-dialin.net User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:EHf+MHKvoopNPFh1AWkpI64ELiE= X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73126 Archived-At: 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