bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: rcs2log script bug


From: Paul Eggert
Subject: Re: rcs2log script bug
Date: 14 Feb 2004 23:52:23 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

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  <eggert@twinsun.com>

        * 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
        <http://mail.gnu.org/archive/html/bug-gnu-emacs/2004-02/msg00085.html>,
        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 <CVS/Repository` || exit
                test ! -f CVS/Root || CVSROOT=`cat <CVS/Root` || exit
+               pository=
                case $CVSROOT in
-               *:/*:/*)
-                       echo >&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




reply via email to

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