diff options
author | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-08 16:45:53 +0000 |
---|---|---|
committer | Xavier Santolaria <xsa@cvs.openbsd.org> | 2007-06-08 16:45:53 +0000 |
commit | 471eb38a5c36e357b90b85c62decb22a918f1bd1 (patch) | |
tree | 68dcc223bb52077698dd44a09e05d66d2cb961a8 /usr.bin/rcs | |
parent | 470457a81490c824f40e7d8c1a6cc068491d5ae4 (diff) |
If strict locking is disabled, make file writable by owner on checkout.
Matches GNU's behaviour. From Pierre Riteau (long time ago).
Diffstat (limited to 'usr.bin/rcs')
-rw-r--r-- | usr.bin/rcs/co.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/rcs/co.c b/usr.bin/rcs/co.c index 040dc2adba2..ea47c37d0aa 100644 --- a/usr.bin/rcs/co.c +++ b/usr.bin/rcs/co.c @@ -1,4 +1,4 @@ -/* $OpenBSD: co.c,v 1.106 2007/06/07 09:08:54 xsa Exp $ */ +/* $OpenBSD: co.c,v 1.107 2007/06/08 16:45:52 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink <joris@openbsd.org> * All rights reserved. @@ -409,6 +409,10 @@ checkout_rev(RCSFILE *file, RCSNUM *frev, const char *dst, int flags, } } + /* If strict locking is disabled, make file writable by owner. */ + if (rcs_lock_getmode(file) == RCS_LOCK_LOOSE) + mode |= S_IWUSR; + if (file->rf_ndelta == 0 && !(flags & QUIET) && ((flags & CO_LOCK) || (flags & CO_UNLOCK))) { (void)fprintf(stderr, "no revisions, so nothing can be %s\n", |