Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/cvs/src Don't compile LOCALID into the client, make...



details:   https://anonhg.NetBSD.org/src/rev/6e84176ba607
branches:  trunk
changeset: 498374:6e84176ba607
user:      wiz <wiz%NetBSD.org@localhost>
date:      Sat Oct 21 12:40:23 2000 +0000

description:
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.

diffstat:

 gnu/dist/cvs/src/cvs.h       |   1 +
 gnu/dist/cvs/src/main.c      |   1 +
 gnu/dist/cvs/src/mkmodules.c |   3 +++
 gnu/dist/cvs/src/parseinfo.c |   8 ++++++++
 gnu/dist/cvs/src/rcs.c       |  11 +++++++----
 5 files changed, 20 insertions(+), 4 deletions(-)

diffs (88 lines):

diff -r 5d24fe4e50bf -r 6e84176ba607 gnu/dist/cvs/src/cvs.h
--- a/gnu/dist/cvs/src/cvs.h    Sat Oct 21 09:03:57 2000 +0000
+++ b/gnu/dist/cvs/src/cvs.h    Sat Oct 21 12:40:23 2000 +0000
@@ -363,6 +363,7 @@
 extern int use_editor;
 extern int cvswrite;
 extern mode_t cvsumask;
+extern char *RCS_citag;
 
 /* Access method specified in CVSroot. */
 typedef enum {
diff -r 5d24fe4e50bf -r 6e84176ba607 gnu/dist/cvs/src/main.c
--- a/gnu/dist/cvs/src/main.c   Sat Oct 21 09:03:57 2000 +0000
+++ b/gnu/dist/cvs/src/main.c   Sat Oct 21 12:40:23 2000 +0000
@@ -50,6 +50,7 @@
 int top_level_admin = 0;
 
 mode_t cvsumask = UMASK_DFLT;
+char *RCS_citag = NULL;
 
 char *CurDir;
 
diff -r 5d24fe4e50bf -r 6e84176ba607 gnu/dist/cvs/src/mkmodules.c
--- a/gnu/dist/cvs/src/mkmodules.c      Sat Oct 21 09:03:57 2000 +0000
+++ b/gnu/dist/cvs/src/mkmodules.c      Sat Oct 21 12:40:23 2000 +0000
@@ -288,6 +288,9 @@
     "# 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 -r 5d24fe4e50bf -r 6e84176ba607 gnu/dist/cvs/src/parseinfo.c
--- a/gnu/dist/cvs/src/parseinfo.c      Sat Oct 21 09:03:57 2000 +0000
+++ b/gnu/dist/cvs/src/parseinfo.c      Sat Oct 21 12:40:23 2000 +0000
@@ -326,6 +326,14 @@
                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 -r 5d24fe4e50bf -r 6e84176ba607 gnu/dist/cvs/src/rcs.c
--- a/gnu/dist/cvs/src/rcs.c    Sat Oct 21 09:03:57 2000 +0000
+++ b/gnu/dist/cvs/src/rcs.c    Sat Oct 21 12:40:23 2000 +0000
@@ -3707,7 +3707,7 @@
     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 @@
     { 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 @@
        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)



Home | Main Index | Thread Index | Old Index