From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: Re: rcs2log script bug Date: 14 Feb 2004 23:52:23 -0800 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <8765e87pag.fsf@penguin.cs.ucla.edu> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1076831646 17001 80.91.224.253 (15 Feb 2004 07:54:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 15 Feb 2004 07:54:06 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 15 08:53:59 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsH6F-0003Fo-00 for ; Sun, 15 Feb 2004 08:53:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsH5Y-0003WA-CZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Feb 2004 02:53:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AsH5U-0003U7-JY for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2004 02:53:12 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsH4w-0002uP-8K for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2004 02:53:10 -0500 Original-Received: from [131.179.128.30] (helo=mailman.cs.ucla.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsH4v-0002sh-QC for bug-gnu-emacs@gnu.org; Sun, 15 Feb 2004 02:52:37 -0500 Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by mailman.cs.ucla.edu (8.11.7p1+Sun/8.11.7/UCLACS-5.2) with ESMTP id i1F7qNj17259; Sat, 14 Feb 2004 23:52:24 -0800 (PST) Original-Received: from eggert by penguin.cs.ucla.edu with local (Exim 3.35 #1 (Debian)) id 1AsH4h-0003d8-00; Sat, 14 Feb 2004 23:52:23 -0800 Original-To: Wolfgang Scherer In-Reply-To: Original-Lines: 48 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:6973 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:6973 Thanks for your bug report. I installed the following more-general patch; if it doesn't work for you, please let me know. 2004-02-14 Paul Eggert * rcs2log: Work correctly if CVSROOT specifies :fork: or :local: methods, or omits the colon between the hostname and the path. Allow :/ in repository path, since CVS does. Fix typo: "pository" should be set from $CVSROOT, not $repository. This fixes a bug reported by Wolfgang Scherer in , along with some related bugs I discovered by inspecting how CVS itself parses $CVSROOT. --- lib-src/rcs2log 27 Dec 2003 08:18:08 -0000 1.52 +++ lib-src/rcs2log 15 Feb 2004 07:41:58 -0000 1.53 @@ -251,18 +251,24 @@ case $rlogfile in rlog='cvs -q log' repository=`sed 1q &2 "$0: $CVSROOT: CVSROOT has multiple ':/'s" - exit 1;; - *:/*) + /* | :fork:* | :local:*) ;; + */*) # remote repository - pository=`expr "X$repository" : '.*:\(/.*\)'`;; - *) + pository=`expr "X$CVSROOT" : '[^/]*\(.*\)'`;; + esac + case $pository in + '') # local repository case $repository in /*) ;; - *) repository=${CVSROOT?}/$repository;; + *) + repository=${CVSROOT?}/$repository + case $repository in + :fork:* | :local:*) + repository=`expr "$repository" : ':[^:]*:\(.*\)'`;; + esac;; esac if test ! -d "$repository" then