DragonFly BSD
DragonFly submit List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

CVS read-only handling


From: Joerg Sonnenberger <joerg@xxxxxxxxxxxxxxxxx>
Date: Mon, 24 Jan 2005 18:19:49 +0100
Mail-followup-to: submit@crater.dragonflybsd.org

Hi all,
those of you regularly mixing local and remote repositories
might find the attached patch useful. It changes the handling
of CVSREADONLYFS to be ignored for remote repositories,
instead of bailing out. This allows you to set it e.g.
in leaf's .cshrc and still commit :) The handling of
-R isn't changed, it still generates an error.

If noone objects, I'll commit this tomorrrow.

Joerg
Index: Makefile
===================================================================
RCS file: /home/joerg/wd/repository/dragonflybsd/src/gnu/usr.bin/cvs/cvs/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile	20 May 2004 02:27:56 -0000	1.6
+++ Makefile	24 Jan 2005 17:15:18 -0000
@@ -20,7 +20,7 @@
 	log-buffer.c login.c logmsg.c mkmodules.c \
 	modules.c myndbm.c no_diff.c parseinfo.c patch.c prepend_args.c \
 	rcs.c rcscmds.c \
-	recurse.c release.c remove.c repos.c root.c rsh-client.c run.c \
+	recurse.c release.c remove.c repos.c ${.OBJDIR}/root.c rsh-client.c run.c \
 	scramble.c server.c socket-client.c status.c subr.c tag.c update.c \
 	vers_ts.c version.c watch.c wrapper.c zlib.c \
 	${.OBJDIR}/main.c ${.OBJDIR}/diff.c
@@ -34,6 +34,9 @@
 ${.OBJDIR}/cvs.1: cvs.1.patch
 	patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/doc/cvs.1
 
+${.OBJDIR}/root.c: root.c.patch
+	patch -o ${.TARGET} -i ${.ALLSRC} ${CONTRIBDIR}/src/root.c
+
 CLEANFILES+= ${.OBJDIR}/main.c ${.OBJDIR}/diff.c ${.OBJDIR}/cvs.1
 
 CFLAGS+= -I${.CURDIR} -I../lib -DHAVE_CONFIG_H \
Index: root.c.patch
===================================================================
RCS file: root.c.patch
diff -N root.c.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ root.c.patch	24 Jan 2005 17:16:47 -0000
@@ -0,0 +1,25 @@
+$DragonFly$
+Index: root.c
+===================================================================
+RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/cvs-1.12.9/src/root.c,v
+retrieving revision 1.1
+diff -u -r1.1 root.c
+--- root.c	3 Aug 2004 18:08:51 -0000	1.1
++++ root.c	24 Jan 2005 16:56:08 -0000
+@@ -507,10 +507,14 @@
+ #ifdef CLIENT_SUPPORT
+     newroot->isremote = (newroot->method != local_method);
+ 
+-    if (readonlyfs && newroot->isremote)
+-	error (1, 0,
++    if (newroot->isremote && readonlyfs) {
++	/* downgrade readonlyfs settings via environment */
++	if (readonlyfs < 0)
++	    error (1, 0,
+ "Read-only repository feature unavailable with remote roots (cvsroot = %s)",
+ 	       cvsroot_copy);
++	readonlyfs = 0;
++    }
+ 
+     if ((newroot->method != local_method)
+ #ifdef CLIENT_SUPPORT


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