Don't compile LOCALID into the client, make it a repository specific
variable. The LOCALID is now set in the repository's CVSROOT/config file, with a line tag=something (in our case 'tag=NetBSD'). Taken from OpenBSD.
This commit is contained in:
parent
5e9e3fbf13
commit
5d76b1c7a2
1
gnu/dist/cvs/src/cvs.h
vendored
1
gnu/dist/cvs/src/cvs.h
vendored
@ -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 {
|
||||
|
1
gnu/dist/cvs/src/main.c
vendored
1
gnu/dist/cvs/src/main.c
vendored
@ -50,6 +50,7 @@ int logoff = 0;
|
||||
int top_level_admin = 0;
|
||||
|
||||
mode_t cvsumask = UMASK_DFLT;
|
||||
char *RCS_citag = NULL;
|
||||
|
||||
char *CurDir;
|
||||
|
||||
|
3
gnu/dist/cvs/src/mkmodules.c
vendored
3
gnu/dist/cvs/src/mkmodules.c
vendored
@ -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
|
||||
};
|
||||
|
||||
|
8
gnu/dist/cvs/src/parseinfo.c
vendored
8
gnu/dist/cvs/src/parseinfo.c
vendored
@ -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)
|
||||
|
11
gnu/dist/cvs/src/rcs.c
vendored
11
gnu/dist/cvs/src/rcs.c
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user