diff --git a/gnu/dist/cvs/src/cvs.h b/gnu/dist/cvs/src/cvs.h index cdb570829a60..a8526b2faea1 100644 --- a/gnu/dist/cvs/src/cvs.h +++ b/gnu/dist/cvs/src/cvs.h @@ -363,6 +363,7 @@ extern int really_quiet, quiet; extern int use_editor; extern int cvswrite; extern mode_t cvsumask; +extern char *RCS_citag; /* Access method specified in CVSroot. */ typedef enum { diff --git a/gnu/dist/cvs/src/main.c b/gnu/dist/cvs/src/main.c index de563c725e0e..539670c21933 100644 --- a/gnu/dist/cvs/src/main.c +++ b/gnu/dist/cvs/src/main.c @@ -50,6 +50,7 @@ int logoff = 0; int top_level_admin = 0; mode_t cvsumask = UMASK_DFLT; +char *RCS_citag = NULL; char *CurDir; diff --git a/gnu/dist/cvs/src/mkmodules.c b/gnu/dist/cvs/src/mkmodules.c index 966618453734..f576ed2c2dd2 100644 --- a/gnu/dist/cvs/src/mkmodules.c +++ b/gnu/dist/cvs/src/mkmodules.c @@ -288,6 +288,9 @@ static const char *const config_contents[] = { "# level of the new working directory when using the `cvs checkout'\n", "# command.\n", "#TopLevelAdmin=no\n", + "\n", + "# Set this to the name of a local tag to use in addition to Id\n", + "#tag=OurTag\n", NULL }; diff --git a/gnu/dist/cvs/src/parseinfo.c b/gnu/dist/cvs/src/parseinfo.c index 1c1ab70c87e2..b34429570814 100644 --- a/gnu/dist/cvs/src/parseinfo.c +++ b/gnu/dist/cvs/src/parseinfo.c @@ -326,6 +326,14 @@ parse_config (cvsroot) goto error_return; } } + else if (strcmp (line, "tag") == 0) { + RCS_citag = strdup(p); + if (RCS_citag == NULL) { + error (0, 0, "%s: no memory for local tag '%s'", + infopath, p); + goto error_return; + } + } else if (strcmp (line, "PreservePermissions") == 0) { if (strcmp (p, "no") == 0) diff --git a/gnu/dist/cvs/src/rcs.c b/gnu/dist/cvs/src/rcs.c index cade77643fff..cf7bf6520510 100644 --- a/gnu/dist/cvs/src/rcs.c +++ b/gnu/dist/cvs/src/rcs.c @@ -3707,7 +3707,7 @@ struct rcs_keyword size_t len; }; #define KEYWORD_INIT(s) (s), sizeof (s) - 1 -static const struct rcs_keyword keywords[] = +static struct rcs_keyword keywords[] = { { KEYWORD_INIT ("Author") }, { KEYWORD_INIT ("Date") }, @@ -3720,9 +3720,7 @@ static const struct rcs_keyword keywords[] = { KEYWORD_INIT ("Revision") }, { KEYWORD_INIT ("Source") }, { KEYWORD_INIT ("State") }, -#ifdef LOCALID - { KEYWORD_INIT (LOCALID) }, -#endif + { NULL, 0 }, { NULL, 0 } }; enum keyword @@ -3875,6 +3873,11 @@ expand_keywords (rcs, ver, name, log, loglen, expand, buf, len, retbuf, retlen) return; } + if (RCS_citag != NULL) { + keywords[KEYWORD_LOCALID].string = RCS_citag; + keywords[KEYWORD_LOCALID].len = strlen(RCS_citag); + } + /* If we are using -kkvl, dig out the locker information if any. */ locker = NULL; if (expand == KFLAG_KVL)