diff options
| author | Paul Eggert | 2004-02-15 07:41:58 +0000 |
|---|---|---|
| committer | Paul Eggert | 2004-02-15 07:41:58 +0000 |
| commit | 83d48514ec1b20443fb6be1160113c0d0624a55b (patch) | |
| tree | 8de7f6b6ede4a317415cab1de42333150b5ed6e4 /lib-src | |
| parent | 584b627ec9208019291752150efc322aa501f56e (diff) | |
| download | emacs-83d48514ec1b20443fb6be1160113c0d0624a55b.tar.gz emacs-83d48514ec1b20443fb6be1160113c0d0624a55b.zip | |
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.
Diffstat (limited to 'lib-src')
| -rwxr-xr-x | lib-src/rcs2log | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/lib-src/rcs2log b/lib-src/rcs2log index 9528e6b1d9c..b7466b6c134 100755 --- a/lib-src/rcs2log +++ b/lib-src/rcs2log | |||
| @@ -29,10 +29,10 @@ Options: | |||
| 29 | 29 | ||
| 30 | Report bugs to <bug-gnu-emacs@gnu.org>.' | 30 | Report bugs to <bug-gnu-emacs@gnu.org>.' |
| 31 | 31 | ||
| 32 | Id='$Id: rcs2log,v 1.51 2003/09/01 15:45:03 miles Exp $' | 32 | Id='$Id: rcs2log,v 1.52 2003/12/27 08:18:08 uid65632 Exp $' |
| 33 | 33 | ||
| 34 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003 | 34 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2002, 2003, |
| 35 | # Free Software Foundation, Inc. | 35 | # 2004 Free Software Foundation, Inc. |
| 36 | 36 | ||
| 37 | # This program is free software; you can redistribute it and/or modify | 37 | # This program is free software; you can redistribute it and/or modify |
| 38 | # it under the terms of the GNU General Public License as published by | 38 | # it under the terms of the GNU General Public License as published by |
| @@ -49,7 +49,7 @@ Id='$Id: rcs2log,v 1.51 2003/09/01 15:45:03 miles Exp $' | |||
| 49 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 49 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 50 | # Boston, MA 02111-1307, USA. | 50 | # Boston, MA 02111-1307, USA. |
| 51 | 51 | ||
| 52 | Copyright='Copyright (C) 2003 Free Software Foundation, Inc. | 52 | Copyright='Copyright (C) 2004 Free Software Foundation, Inc. |
| 53 | This program comes with NO WARRANTY, to the extent permitted by law. | 53 | This program comes with NO WARRANTY, to the extent permitted by law. |
| 54 | You may redistribute copies of this program | 54 | You may redistribute copies of this program |
| 55 | under the terms of the GNU General Public License. | 55 | under the terms of the GNU General Public License. |
| @@ -251,18 +251,24 @@ case $rlogfile in | |||
| 251 | rlog='cvs -q log' | 251 | rlog='cvs -q log' |
| 252 | repository=`sed 1q <CVS/Repository` || exit | 252 | repository=`sed 1q <CVS/Repository` || exit |
| 253 | test ! -f CVS/Root || CVSROOT=`cat <CVS/Root` || exit | 253 | test ! -f CVS/Root || CVSROOT=`cat <CVS/Root` || exit |
| 254 | pository= | ||
| 254 | case $CVSROOT in | 255 | case $CVSROOT in |
| 255 | *:/*:/*) | 256 | /* | :fork:* | :local:*) ;; |
| 256 | echo >&2 "$0: $CVSROOT: CVSROOT has multiple ':/'s" | 257 | */*) |
| 257 | exit 1;; | ||
| 258 | *:/*) | ||
| 259 | # remote repository | 258 | # remote repository |
| 260 | pository=`expr "X$repository" : '.*:\(/.*\)'`;; | 259 | pository=`expr "X$CVSROOT" : '[^/]*\(.*\)'`;; |
| 261 | *) | 260 | esac |
| 261 | case $pository in | ||
| 262 | '') | ||
| 262 | # local repository | 263 | # local repository |
| 263 | case $repository in | 264 | case $repository in |
| 264 | /*) ;; | 265 | /*) ;; |
| 265 | *) repository=${CVSROOT?}/$repository;; | 266 | *) |
| 267 | repository=${CVSROOT?}/$repository | ||
| 268 | case $repository in | ||
| 269 | :fork:* | :local:*) | ||
| 270 | repository=`expr "$repository" : ':[^:]*:\(.*\)'`;; | ||
| 271 | esac;; | ||
| 266 | esac | 272 | esac |
| 267 | if test ! -d "$repository" | 273 | if test ! -d "$repository" |
| 268 | then | 274 | then |