all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* rcs2log script bug
@ 2004-02-11 16:45 Wolfgang Scherer
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Scherer @ 2004-02-11 16:45 UTC (permalink / raw)




Hi,

we use CVS repositories in the following format:

  :pserver:user@host:port/cvs-root/repository
                     ^^^^

which are reported as bad repository names by rcs2log.

This patch fixes it.

--- rcs2log	2004/02/11 16:34:10	1.1
+++ rcs2log	2004/02/11 16:35:13
@@ -254,9 +254,9 @@
 		*:/*:/*)
 			echo >&2 "$0: $CVSROOT: CVSROOT has multiple ':/'s"
 			exit 1;;
-		*:/*)
+		*:/*|*:[0-9]/*|*:[0-9][0-9]/*|*:[0-9][0-9][0-9]/*|*:[0-9][0-9][0-9][0-9]/*|*:[0-9][0-9][0-9][0-9][0-9]/*)
 			# remote repository
-			pository=`expr "X$repository" : '.*:\(/.*\)'`;;
+			pository=`expr "X$repository" : '.*:[0-9]*\(/.*\)'`;;
 		*)
 			# local repository
 			case $repository in

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rcs2log script bug
       [not found] <E1ArhBj-0007Vx-Ed@fencepost.gnu.org>
@ 2004-02-15  7:52 ` Paul Eggert
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2004-02-15  7:52 UTC (permalink / raw)
  Cc: bug-gnu-emacs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-15  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-11 16:45 rcs2log script bug Wolfgang Scherer
     [not found] <E1ArhBj-0007Vx-Ed@fencepost.gnu.org>
2004-02-15  7:52 ` Paul Eggert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.