add cvs -W option to disable -R/CVSREADONLYFS
Norikatsu Shigemura
nork at FreeBSD.org
Tue Mar 9 03:35:34 PST 2004
Hi peter.
On Tue, 9 Mar 2004 20:17:34 +0900 (JST)
Norikatsu Shigemrua <nork at freebsd.org> wrote:
> >Synopsis: add cvs -W option to disable -R/CVSREADONLYFS
> >Description:
> I added a feature which is to nagate a effect of -R/CVSREADONLYFS
> to cvs as -W option. Please review and commit.
> >How-To-Repeat:
> N/A
> >Fix:
> Following patches are for cvs-1.12.5.
I wrote for FreeBSD's cvs. Please, please!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Index: src/contrib/cvs/man/cvs.1
===================================================================
RCS file: /home/ncvs/src/contrib/cvs/man/cvs.1,v
retrieving revision 1.20
diff -u -r1.20 cvs.1
--- src/contrib/cvs/man/cvs.1 13 Nov 2003 17:57:53 -0000 1.20
+++ src/contrib/cvs/man/cvs.1 9 Mar 2004 10:44:33 -0000
@@ -244,7 +244,8 @@
.SM CVSREADONLYFS
environment variable is set. Using
.B \-R
-can also considerably speed up checkout's over NFS.
+can also considerably speed up checkout's over NFS. If you want to disable
+this feature, you should specify -W option.
.TP
.B \-v [ --version ]
Displays version and copyright information for
@@ -255,6 +256,10 @@
Overrides the setting of the
.SM CVSREAD
environment variable.
+.TP
+.B \-W
+Turns off read-only repository mode. This is default mode, but it
+typically uses to negate the effect of -R option.
.TP
.B \-g
Forces group-write perms on working files. This option is typically
Index: src/contrib/cvs/src/main.c
===================================================================
RCS file: /home/ncvs/src/contrib/cvs/src/main.c,v
retrieving revision 1.23
diff -u -r1.23 main.c
--- src/contrib/cvs/src/main.c 7 Jul 2003 19:15:36 -0000 1.23
+++ src/contrib/cvs/src/main.c 9 Mar 2004 10:44:33 -0000
@@ -256,6 +256,7 @@
" -n Do not execute anything that will change the disk.\n",
" -t Show trace of program execution -- try with -n.\n",
" -R Assume repository is read-only, such as CDROM\n",
+ " -W Assume repository is writable (default).\n",
" -v CVS version and copyright.\n",
" -T tmpdir Use 'tmpdir' for temporary files.\n",
" -e editor Use 'editor' for editing log information.\n",
@@ -413,7 +414,7 @@
int help = 0; /* Has the user asked for help? This
lets us support the `cvs -H cmd'
convention to give help for cmd. */
- static const char short_options[] = "+QqgrwtnRlvb:T:e:d:Hfz:s:xaU";
+ static const char short_options[] = "+QqgrwtnRWlvb:T:e:d:Hfz:s:xaU";
static struct option long_options[] =
{
{"help", 0, NULL, 'H'},
@@ -556,6 +557,10 @@
break;
case 'R':
readonlyfs = 1;
+ logoff = 1;
+ break;
+ case 'W':
+ readonlyfs = 0;
logoff = 1;
break;
case 'n':
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
More information about the freebsd-hackers
mailing list