From 9d520c8a553dc94877f83f7a0ea1930ec04fb6fe Mon Sep 17 00:00:00 2001 From: peter Date: Sat, 17 May 1997 14:04:18 +0000 Subject: Catch write-lock attempts immediately if running in read-only mode rather than depending on getting a write fail. --- contrib/cvs/src/lock.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contrib/cvs') diff --git a/contrib/cvs/src/lock.c b/contrib/cvs/src/lock.c index 1ff6864..6b8fa3d 100644 --- a/contrib/cvs/src/lock.c +++ b/contrib/cvs/src/lock.c @@ -319,6 +319,11 @@ Writer_Lock (list) if (noexec) return (0); + if (readonlyfs) { + error (0, 0, "write lock failed - read-only repository"); + return (1); + } + /* We only know how to do one list at a time */ if (locklist != (List *) NULL) { -- cgit v1.1