Only in cvs_my/: autom4te.cache diff -r -u cvs-1.12.12/doc/cvs.texinfo cvs_my/doc/cvs.texinfo --- cvs-1.12.12/doc/cvs.texinfo 2005-04-14 17:56:36.000000000 +0200 +++ cvs_my/doc/cvs.texinfo 2005-05-09 17:45:41.070237832 +0200 @@ -6569,6 +6569,16 @@ the change to @file{b/three.c} and not the change to @file{a/two.c}. +@noindent +Before the lock is created, the @file{loginfo} in CVSROOT is +consulted. Every non-comment line in that file should +contain a directory pattern and a filter. On the first +match between the current active directory and the pattern +the filter is executed with the directory as parameter. The +special pattern ALL matches always. When the exit code of +the filter is not zero, the lock creation failes. If the +exit code is zero, normal lock creation procedure continues. + @node Watches @section Mechanisms to track who is editing files @cindex Watches Only in cvs_my/src: autom4te.cache diff -r -u cvs-1.12.12/src/cvs.h cvs_my/src/cvs.h --- cvs-1.12.12/src/cvs.h 2005-04-14 16:14:55.000000000 +0200 +++ cvs_my/src/cvs.h 2005-05-09 17:46:39.380627969 +0200 @@ -163,6 +163,7 @@ #define CVSROOTADM_CONFIG "config" #define CVSROOTADM_HISTORY "history" #define CVSROOTADM_IGNORE "cvsignore" +#define CVSROOTADM_LOCKINFO "lockinfo" #define CVSROOTADM_LOGINFO "loginfo" #define CVSROOTADM_MODULES "modules" #define CVSROOTADM_NOTIFY "notify" diff -r -u cvs-1.12.12/src/lock.c cvs_my/src/lock.c --- cvs-1.12.12/src/lock.c 2005-04-14 16:13:26.000000000 +0200 +++ cvs_my/src/lock.c 2005-05-09 17:46:47.173076461 +0200 @@ -476,7 +476,23 @@ } } +int +check_lock_info_proc(const char * rep, const char * filter, void * ud) +{ + const char * srepos = Short_Repository(rep); + char * cmdline = Xasprintf("%s %s", filter, rep); + run_setup (cmdline); + free(cmdline); + return(abs(run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL | RUN_SIGIGNORE))); +} +int +check_lock_info(const char * xrep) +{ + int n; + n = Parse_Info (CVSROOTADM_LOCKINFO, xrep, check_lock_info_proc, PIOPT_ALL, NULL); + return n; +} /* * Create a lock file for readers @@ -489,6 +505,11 @@ TRACE (TRACE_FUNCTION, "Reader_Lock(%s)", xrepository); + if (check_lock_info(xrepository)){ + error(0, 0, "Lock Info failed"); + return 1; + } + if (noexec || readonlyfs) return 0; diff -r -u cvs-1.12.12/src/mkmodules.c cvs_my/src/mkmodules.c --- cvs-1.12.12/src/mkmodules.c 2005-03-17 20:42:23.000000000 +0100 +++ cvs_my/src/mkmodules.c 2005-05-09 17:50:17.167266049 +0200 @@ -182,6 +182,25 @@ NULL }; +static const char *const lockinfo_contents[] = { + "# The \"lockinfo\" file is used to control read locks for directories.\n", + "# The filter on the right is invoked with the repository directory \n", + "# to check. A non-zero exit of the filter program will \n", + "# cause the lock creation to be aborted.\n", + "#\n", + "# The first entry on a line is a regular expression which is tested\n", + "# against the directory that the lock is created in, relative\n", + "# to the $CVSROOT. For the first match that is found, then the remainder\n", + "# of the line is the name of the filter to run.\n", + "#\n", + "# If the repository name does not match any of the regular expressions in this\n", + "# file, the \"DEFAULT\" line is used, if it is specified.\n", + "#\n", + "# If the name \"ALL\" appears as a regular expression it is always used\n", + "# in addition to the first matching regex or \"DEFAULT\".\n", + NULL +}; + static const char *const taginfo_contents[] = { "# The \"taginfo\" file is used to control pre-tag checks.\n", "# The filter on the right is invoked with the following arguments\n", @@ -652,6 +671,10 @@ {CVSROOTADM_WRITERS, "a %s file specifies read/write users", NULL}, + {CVSROOTADM_LOCKINFO, + "a %s file can be used to control the creation of read locks", + lockinfo_contents}, + /* Some have suggested listing CVSROOTADM_PASSWD here too. This would mean that CVS commands which operate on the Only in cvs_my/: test