summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cvs
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-06-11 00:52:44 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-06-11 00:52:44 +0000
commita17ec7c9237ff9a039a134c5ec4ddd6f5121c122 (patch)
treef0defab7dd149a9609e4fd09d2d407946fcbbaae /gnu/usr.bin/cvs
parentaca026a36001bd6ccecb84c44ceac1bda62a0147 (diff)
Add a CVSROOT/config option "DisableMdocdate" (default:no) to turn off
the OpenBSD-specific Mdocdate expansion. This is useful to avoid conflicts that arise between the server's expansion of Mdocdate and the upstream code when maintaining forked OpenBSD derived code on an OpenBSD CVS server. "I must grudgingly agree that this is neccessary" deraadt@
Diffstat (limited to 'gnu/usr.bin/cvs')
-rw-r--r--gnu/usr.bin/cvs/src/cvs.h1
-rw-r--r--gnu/usr.bin/cvs/src/main.c1
-rw-r--r--gnu/usr.bin/cvs/src/mkmodules.c3
-rw-r--r--gnu/usr.bin/cvs/src/parseinfo.c11
-rw-r--r--gnu/usr.bin/cvs/src/rcs.c2
5 files changed, 18 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/src/cvs.h b/gnu/usr.bin/cvs/src/cvs.h
index 188df983469..cfcb5a24350 100644
--- a/gnu/usr.bin/cvs/src/cvs.h
+++ b/gnu/usr.bin/cvs/src/cvs.h
@@ -369,6 +369,7 @@ extern int really_quiet, quiet;
extern int use_editor;
extern int cvswrite;
extern mode_t cvsumask;
+extern int disable_mdocdate;
extern char *RCS_citag;
/* Access method specified in CVSroot. */
diff --git a/gnu/usr.bin/cvs/src/main.c b/gnu/usr.bin/cvs/src/main.c
index 96fc22fe406..8040b137066 100644
--- a/gnu/usr.bin/cvs/src/main.c
+++ b/gnu/usr.bin/cvs/src/main.c
@@ -51,6 +51,7 @@ int top_level_admin = 0;
mode_t cvsumask = UMASK_DFLT;
char *RCS_citag = NULL;
+int disable_mdocdate = 0;
char *CurDir;
diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c
index 3a35cb3cec0..48a5f4f1e2d 100644
--- a/gnu/usr.bin/cvs/src/mkmodules.c
+++ b/gnu/usr.bin/cvs/src/mkmodules.c
@@ -307,6 +307,9 @@ static const char *const config_contents[] = {
"# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the\n",
"# history file, or a subset as needed (ie `TMAR' logs all write operations)\n",
"#LogHistory=TOFEWGCMAR\n",
+ "\n",
+ "# Set DisableMdocdate=yes to turn off expansion of the Mdocdate keyword\n",
+ "#DisableMdocdate=no\n",
NULL
};
diff --git a/gnu/usr.bin/cvs/src/parseinfo.c b/gnu/usr.bin/cvs/src/parseinfo.c
index 19a960c6c94..fbcc3a53c8c 100644
--- a/gnu/usr.bin/cvs/src/parseinfo.c
+++ b/gnu/usr.bin/cvs/src/parseinfo.c
@@ -346,6 +346,17 @@ parse_config (cvsroot)
else if (strcmp (line, "umask") == 0) {
cvsumask = (mode_t)(strtol(p, NULL, 8) & 0777);
}
+ else if (strcmp (line, "DisableMdocdate") == 0) {
+ if (strcmp (p, "no") == 0)
+ disable_mdocdate = 0;
+ else if (strcmp (p, "yes") == 0)
+ disable_mdocdate = 1;
+ else
+ {
+ error (0, 0, "unrecognized value '%s' for DisableMdocdate", p);
+ goto error_return;
+ }
+ }
else if (strcmp (line, "dlimit") == 0) {
#ifdef BSD
#include <sys/resource.h>
diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c
index e2bfc913204..4260952e10e 100644
--- a/gnu/usr.bin/cvs/src/rcs.c
+++ b/gnu/usr.bin/cvs/src/rcs.c
@@ -3628,6 +3628,8 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen)
break;
case KEYWORD_MDOCDATE:
+ if (disable_mdocdate)
+ continue;
value = mdoc_date (ver->date);
free_value = 1;
break;