diff options
author | 2007-06-12 06:09:38 +0000 | |
---|---|---|
committer | 2007-06-12 06:09:38 +0000 | |
commit | 8f60c2662641be49f03a61a10383ea5c405553e5 (patch) | |
tree | b86e28e0c8b85d2223581ea2fc858f0939ac64d9 | |
parent | When removeing as-ext LSA initialise the metric to some sane default else (diff) | |
download | wireguard-openbsd-8f60c2662641be49f03a61a10383ea5c405553e5.tar.xz wireguard-openbsd-8f60c2662641be49f03a61a10383ea5c405553e5.zip |
Allow checkin without locking (after rcs -U). Matches GNU's behaviour.
Problem reported by itojun@. Tests itojun@; OK niallo@.
-rw-r--r-- | usr.bin/rcs/ci.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/rcs/ci.c b/usr.bin/rcs/ci.c index 2e3c98c68bc..1e9d44bf64a 100644 --- a/usr.bin/rcs/ci.c +++ b/usr.bin/rcs/ci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ci.c,v 1.198 2007/04/26 21:48:37 sobrado Exp $ */ +/* $OpenBSD: ci.c,v 1.199 2007/06/12 06:09:38 xsa Exp $ */ /* * Copyright (c) 2005, 2006 Niall O'Higgins <niallo@openbsd.org> * All rights reserved. @@ -531,7 +531,8 @@ checkin_update(struct checkin_params *pb) pb->flags); } - if (rcs_lock_remove(pb->file, pb->username, pb->frev) < 0) { + if ((rcs_lock_remove(pb->file, pb->username, pb->frev) < 0) && + (rcs_lock_getmode(pb->file) != RCS_LOCK_LOOSE)) { if (rcs_errno != RCS_ERR_NOENT) warnx("failed to remove lock"); else if (!(pb->flags & CO_LOCK)) @@ -800,6 +801,9 @@ checkin_checklock(struct checkin_params *pb) { struct rcs_lock *lkp; + if (rcs_lock_getmode(pb->file) == RCS_LOCK_LOOSE) + return (0); + TAILQ_FOREACH(lkp, &(pb->file->rf_locks), rl_list) { if (!strcmp(lkp->rl_name, pb->username) && !rcsnum_cmp(lkp->rl_num, pb->frev, 0)) |