bug-cvs
[Top][All Lists]
Advanced

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

new features for local keywords and keyword expansion


From: Mark D. Baushke
Subject: new features for local keywords and keyword expansion
Date: Mon, 26 May 2003 13:40:18 -0700

Hi Folks,

I have found this feature to be very useful when maintaining lots of
third-party sources and I think the time has come to put it into the
cvshome version of cvs.

The following is a patch for a 'new' feature (really a port of the
feature in OpenBSD and FreeBSD have had for many years). 

I have always found their term "tag" and "tagexpand" to be a bit
confusing with cvs version or branch tags when they really are talking
about the "keywords" that get expanded using the RCS rules. So, I have
here renamed the options as "LocalKeyword" and "KeywordExpand" which I
think better describes what the new options do.

For now, I still provide aliases to the OpenBSD config names for
compatibility (the FreeBSD folks put these options into a
CVSROOT/options file so the compatibility for them is not really
possible).

If folks need/want me to keep the original "tag" and "tagexpand" for
these features, let me know. If folks do not want me to have the new
features have aliases to the OpenBSD option names, let me know that too.

If folks feel that this is an undesirable feature, please let me know
why you think that is true.

Any comments or suggestions for improving the documentation would also
be appreciated.

        Thanks,
        -- Mark

Index: ChangeLog
===================================================================
RCS file: /cvs/ccvs/ChangeLog,v
retrieving revision 1.747
diff -u -p -r1.747 ChangeLog
--- ChangeLog   26 May 2003 06:20:31 -0000      1.747
+++ ChangeLog   26 May 2003 20:27:34 -0000
@@ -1,3 +1,7 @@
+2003-05-26  Mark D. Baushke  <address@hidden>
+
+       * NEWS: New LocalKeyword and KeywordExpand options.
+
 2003-05-26  Derek Price  <address@hidden>
 
        * configure.in: Update CVS version to 1.12.1.1.
Index: NEWS
===================================================================
RCS file: /cvs/ccvs/NEWS,v
retrieving revision 1.129
diff -u -p -r1.129 NEWS
--- NEWS        22 May 2003 21:40:18 -0000      1.129
+++ NEWS        26 May 2003 20:27:34 -0000
@@ -1,3 +1,10 @@
+Changes since 1.12.1:
+
+* New LocalKeyword and KeywordExpand options to CVSROOT/config which
+FreeBSD, OpenBSD, and NetBSD users may find familiar as the "tag" and
+"tagexpand" options used for many years. The CVSHeader keyword has
+also been added to the mixture.
+
 Changes since 1.11.5:
 
 * The new --with-external-zlib option can be passed to configure to compile
Index: doc/ChangeLog
===================================================================
RCS file: /cvs/ccvs/doc/ChangeLog,v
retrieving revision 1.760
diff -u -p -r1.760 ChangeLog
--- doc/ChangeLog       26 May 2003 06:20:12 -0000      1.760
+++ doc/ChangeLog       26 May 2003 20:27:34 -0000
@@ -1,3 +1,15 @@
+2003-05-26  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (Keyword substitution): New menu entry for
+       "Configuring keyword expansion."
+       (Keyword list): New "CVSHeader" keyword. New Local keyword
+       controlled by new LocalKeyword option in CVSROOT/config.
+       (Avoiding substitution): Mention the new KeywordExpansion option
+       in CVSROOT/config.
+       (Configuring keyword expansion): Document the new KeywordExpansion
+       option in CVSROOT/config.
+       (Invoking CVS): New example of CVSHeader keyword expansion.
+
 2003-05-26  Derek Price  <address@hidden>
 
        * stamp-1: Regenerated for 1.12.1.1.
Index: doc/cvs.texinfo
===================================================================
RCS file: /cvs/ccvs/doc/cvs.texinfo,v
retrieving revision 1.567
diff -u -p -r1.567 cvs.texinfo
--- doc/cvs.texinfo     6 May 2003 18:37:10 -0000       1.567
+++ doc/cvs.texinfo     26 May 2003 20:27:34 -0000
@@ -6834,11 +6834,12 @@ with strings of the form
 a new revision of the file.
 
 @menu
-* Keyword list::                Keywords
-* Using keywords::              Using keywords
-* Avoiding substitution::       Avoiding substitution
-* Substitution modes::          Substitution modes
-* Log keyword::                 Problems with the address@hidden keyword.
+* Keyword list::                   Keywords
+* Using keywords::                 Using keywords
+* Avoiding substitution::          Avoiding substitution
+* Substitution modes::             Substitution modes
+* Configuring keyword expansion::  Configuring keyword expansion
+* Log keyword::                    Problems with the address@hidden keyword.
 @end menu
 
 @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -6859,6 +6860,23 @@ This is a list of the keywords:
 @item address@hidden
 The login name of the user who checked in the revision.
 
address@hidden CVSHeader keyword
address@hidden address@hidden
+A standard header (similar to address@hidden, but with
+the CVS root stripped off). It contains the relative
+pathname of the @sc{rcs} file to the CVS root, the
+revision number, the date (UTC), the author, the state,
+and the locker (if locked). Files will normally never
+be locked when you use @sc{cvs}.
+
+Note that this keyword has only been recently
+introduced to @sc{cvs} and may cause problems with
+existing installations if address@hidden is already
+in the files for a different purpose. This keyword may
+be excluded using the @code{KeywordExpansion=eCVSHeader}
+in the @file{CVSROOT/config} file. 
+See @ref{Configuring keyword expansion} for more details.
+
 @cindex Date keyword
 @item address@hidden
 The date and time (UTC) the revision was checked in.
@@ -6936,6 +6954,53 @@ The full pathname of the RCS file.
 The state assigned to the revision.  States can be
 assigned with @code{cvs admin -s}---see @ref{admin options}.
 
address@hidden Local keyword
address@hidden Local keyword
+The @code{LocalKeyword} option in the @file{CVSROOT/config} file
+may be used to specify a local keyword which is to be
+used as an alias for one of the other keywords. For
+example, if the @file{CVSROOT/config} file contains
+a line with @code{LocalKeyword=MYBSD=CVSHeader}, then a
+file with the local keyword address@hidden will be
+expanded as if it were a address@hidden keyword. If
+the src/frob.c file contained this keyword, it might
+look something like this:
+
address@hidden
+  /*
+   * address@hidden: src/frob.c,v 1.1 2003/05/04 09:27:45 john Exp $ 
+   */
address@hidden example
+
+Many repositories make use of a such a ``local
+keyword'' feature. An old patch to @sc{cvs} provided
+the @code{LocalKeyword} feature using a @code{tag=}
+option and called this the ``custom tag'' or ``local
+tag'' feature. It was used in conjunction with the
+what they called the @code{tagexpand=} option. In
address@hidden this other option is known as the
address@hidden option. 
+See @ref{Configuring Keyword Expansion} for more
+details.
+
+Examples from popular projects include:
address@hidden, address@hidden, address@hidden,
address@hidden, address@hidden
+
+The advantage of this is that you can include your
+local version information in a file using this local
+keyword without disrupting the upstream version
+information (which may be a different local keyword or
+a standard keyword). Allowing bug reports and the like
+to more properly identify the source of the original
+bug to the third-party and reducing the number of
+conflicts that arise during an import of a new version.
+
+All keyword expansion except the local keyword may be
+disabled using the @code{KeywordExpansion} option in
+the @file{CVSROOT/config} file---see 
address@hidden keyword expansions} for more details.
+
 @end table
 
 @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -7017,6 +7082,14 @@ contains @samp{$@@address@hidden@}Author$} whene
 and @code{troff} you can embed the null-character
 @code{\&} inside the keyword for a similar effect.
 
+It is also possible to specify an explicit list of
+keywords to include or exclude using the
address@hidden option in the
address@hidden/config} file--see @ref{Configuring keyword expansion}
+for more details. This feature is intended primarily
+for use with the @code{LocalKeyword} option--see
address@hidden keyword}.
+
 @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 @node Substitution modes
 @section Substitution modes
@@ -7107,6 +7180,82 @@ handle an export containing binary files
 @end table
 
 @c - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
address@hidden Configuring keyword expansion
address@hidden Configuring Keyord Expansion
address@hidden Configuring keyword expansion
+
+In a repository that includes third-party software on
+vendor branches, it is sometimes helpful to configure
+CVS to use a local keyword instead of the standard
address@hidden or address@hidden keywords. Examples from
+real projects includ, address@hidden, address@hidden,
address@hidden, address@hidden, address@hidden,
+and even address@hidden The advantage of this is that
+you can include your local version information in a
+file using this local keyword (sometimes called a
+``custom tag'' or a ``local tag'') without disrupting
+the upstream version information (which may be a
+different local keyword or a standard keyword). In
+these cases, it is typically desirable to disable the
+expansion of all keywords except the configured local
+keyword.
+
+The @code{KeywordExpansion} option in the
address@hidden/config} file is intended to allow for the
+either the explicit exclusion of a keyword or list of
+keywords, or for the explicit inclusion of a keyword or
+a list of keywords. This list may include the
address@hidden that has been configured.
+
+The @code{KeywordExpansion} option is followed by
address@hidden and the next character may either be @code{i}
+to start an inclusion list or @code{e} to start an
+exclusion list. If the following lines were added to
+the @file{CVSROOT/config} file:
+
address@hidden
+        # Add a "MyBSD" keyword and restrict keyword
+        # expansion
+        LocalKeyword=MyBSD=CVSHeader
+        KeywordExpand=iMyBSD
address@hidden example
+
+then only the address@hidden keyword would be expanded.
+A list may be used. The this example:
+
address@hidden
+        # Add a "MyBSD" keyword and restrict keyword
+        # expansion to the MyBSD, Name and Date keywords.
+        LocalKeyword=MyBSD=CVSHeader
+        KeywordExpand=iMyBSD,Name,Date
address@hidden example
+
+would allow address@hidden, address@hidden, and
address@hidden to be expanded.
+
+It is also possible to configure an exclusion list
+using the following:
+
address@hidden
+        # Do not expand the non-RCS keyword CVSHeader
+        KeywordExpand=eCVSHeader
address@hidden example
+
+This allows @sc{cvs} to ignore the recently introduced
address@hidden keyword and retain all of the
+others. The exclusion entry could also contain the
+standard RCS keyword list, but that is not recommended.
+
+It should be noted that a patch to provide both the
address@hidden and @code{LocalKeyword} features
+has been around a long time. However, that patch
+implemented these features using @code{tag=} and
address@hidden keywords. For compatibility with
+those systems, ``tag'' is an alisa for ``LocalKeyword''
+and ``tagexpand'' is an alias for ``KeywordExpand'' in
+the @file{CVSROOT/config} file.
+
address@hidden - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- -
 @node Log keyword
 @section Problems with the address@hidden keyword.
 
@@ -11006,6 +11155,7 @@ Keywords (@pxref{Keyword list}):
 @example
 address@hidden: joe $
 address@hidden: 1993/12/09 03:21:13 $
address@hidden: files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 address@hidden: /home/files/file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 address@hidden: file1,v 1.1 1993/12/09 03:21:13 joe Exp harry $
 address@hidden: harry $
Index: src/ChangeLog
===================================================================
RCS file: /cvs/ccvs/src/ChangeLog,v
retrieving revision 1.2451
diff -u -p -r1.2451 ChangeLog
--- src/ChangeLog       23 May 2003 19:09:56 -0000      1.2451
+++ src/ChangeLog       26 May 2003 20:27:34 -0000
@@ -1,3 +1,16 @@
+2003-05-26  Mark D. Baushke  <address@hidden>
+
+       * rcs.c (RCS_setlocalid,RCS_setincexc): New functions to support
+       Tag and TagExpand config keywords.
+
+       * rcs.h (RCS_setlocalid,RCS_setincexc): New prototypes.
+
+       * parseinfo.c (parse_config): Added LocalKeyword (alias "tag")
+       and KeywordExpand (alias "tagexpand") keywords.
+
+       * sanity.sh (keywordexpand): New CVSROOT/config tests for
+       LocalKeyword and KeywordExpand options.
+
 2003-05-23  Larry Jones  <address@hidden>
 
        * sanity.sh (info-cleanup-verifymsg): Avoid race in output.
Index: src/parseinfo.c
===================================================================
RCS file: /cvs/ccvs/src/parseinfo.c,v
retrieving revision 1.43
diff -u -p -r1.43 parseinfo.c
--- src/parseinfo.c     22 May 2003 18:03:28 -0000      1.43
+++ src/parseinfo.c     26 May 2003 20:27:34 -0000
@@ -340,6 +340,18 @@ parse_config (cvsroot)
                goto error_return;
            }
        }
+       else if (strcmp (line, "LocalKeyword") == 0 ||
+                strcmp (line, "tag") == 0)
+       {
+           RCS_setlocalid(p);
+               
+       }
+       else if (strcmp (line, "KeywordExpand") == 0 ||
+                strcmp (line, "tagexpand") == 0)
+       {
+           RCS_setincexc(p);
+               
+       }
        else if (strcmp (line, "PreservePermissions") == 0)
        {
            if (strcmp (p, "no") == 0)
Index: src/rcs.c
===================================================================
RCS file: /cvs/ccvs/src/rcs.c,v
retrieving revision 1.272
diff -u -p -r1.272 rcs.c
--- src/rcs.c   19 May 2003 22:05:05 -0000      1.272
+++ src/rcs.c   26 May 2003 20:27:34 -0000
@@ -133,6 +133,8 @@ static char *rcs_lockfilename PROTO ((ch
    evaluates its arguments multiple times.  */
 #define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0)
 
+static char * getfullCVSname PROTO ((char *, char **));
+
 /*
  * We don't want to use isspace() from the C library because:
  *
@@ -3404,27 +3406,31 @@ struct rcs_keyword
 {
     const char *string;
     size_t len;
+    int expandit;
 };
 #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") },
-    { KEYWORD_INIT ("Header") },
-    { KEYWORD_INIT ("Id") },
-    { KEYWORD_INIT ("Locker") },
-    { KEYWORD_INIT ("Log") },
-    { KEYWORD_INIT ("Name") },
-    { KEYWORD_INIT ("RCSfile") },
-    { KEYWORD_INIT ("Revision") },
-    { KEYWORD_INIT ("Source") },
-    { KEYWORD_INIT ("State") },
-    { NULL, 0 }
+    { KEYWORD_INIT ("Author"), 1 },
+    { KEYWORD_INIT ("Date"), 1 },
+    { KEYWORD_INIT ("CVSHeader"), 1 },
+    { KEYWORD_INIT ("Header"), 1 },
+    { KEYWORD_INIT ("Id"), 1 },
+    { KEYWORD_INIT ("Locker"), 1 },
+    { KEYWORD_INIT ("Log"), 1 },
+    { KEYWORD_INIT ("Name"), 1 },
+    { KEYWORD_INIT ("RCSfile"), 1 },
+    { KEYWORD_INIT ("Revision"), 1 },
+    { KEYWORD_INIT ("Source"), 1 },
+    { KEYWORD_INIT ("State"), 1 },
+    { NULL, 0, 0 },            /* localid */
+    { NULL, 0, 0 }
 };
 enum keyword
 {
     KEYWORD_AUTHOR = 0,
     KEYWORD_DATE,
+    KEYWORD_CVSHEADER,
     KEYWORD_HEADER,
     KEYWORD_ID,
     KEYWORD_LOCKER,
@@ -3433,8 +3439,10 @@ enum keyword
     KEYWORD_RCSFILE,
     KEYWORD_REVISION,
     KEYWORD_SOURCE,
-    KEYWORD_STATE
+    KEYWORD_STATE,
+    KEYWORD_LOCALID
 };
+enum keyword keyword_local = KEYWORD_ID;
 
 /* Convert an RCS date string into a readable string.  This is like
    the RCS date2str function.  */
@@ -3612,7 +3620,8 @@ expand_keywords (rcs, ver, name, log, lo
        slen = s - srch;
        for (keyword = keywords; keyword->string != NULL; keyword++)
        {
-           if (keyword->len == slen
+           if (keyword->expandit
+               && keyword->len == slen
                && strncmp (keyword->string, srch, slen) == 0)
            {
                break;
@@ -3659,15 +3668,25 @@ expand_keywords (rcs, ver, name, log, lo
                free_value = 1;
                break;
 
+           case KEYWORD_CVSHEADER:
            case KEYWORD_HEADER:
            case KEYWORD_ID:
+           case KEYWORD_LOCALID:
                {
                    char *path;
                    int free_path;
                    char *date;
+                   char *old_path;
 
-                   if (kw == KEYWORD_HEADER)
+                   old_path = NULL;
+                   if (kw == KEYWORD_HEADER ||
+                           (kw == KEYWORD_LOCALID &&
+                            keyword_local == KEYWORD_HEADER))
                        path = rcs->path;
+                   else if (kw == KEYWORD_CVSHEADER ||
+                            (kw == KEYWORD_LOCALID &&
+                             keyword_local == KEYWORD_CVSHEADER))
+                       path = getfullCVSname(rcs->path, &old_path);
                    else
                        path = last_component (rcs->path);
                    path = escape_keyword_value (path, &free_path);
@@ -3687,6 +3706,8 @@ expand_keywords (rcs, ver, name, log, lo
                             locker != NULL ? locker : "");
                    if (free_path)
                        free (path);
+                   if (old_path)
+                       free (old_path);
                    free (date);
                    free_value = 1;
                }
@@ -8497,7 +8518,107 @@ make_file_label (path, rev, rcs)
     return label;
 }
 
+void
+RCS_setlocalid (arg)
+    const char *arg;
+{
+    char *copy, *next, *key;
+
+    copy = xstrdup(arg);
+    next = copy;
+    key = strtok(next, "=");
+
+    keywords[KEYWORD_LOCALID].string = xstrdup(key);
+    keywords[KEYWORD_LOCALID].len = strlen(key);
+    keywords[KEYWORD_LOCALID].expandit = 1;
+
+    /* options? */
+    while (key = strtok(NULL, ",")) {
+       if (!strcmp(key, keywords[KEYWORD_ID].string))
+           keyword_local = KEYWORD_ID;
+       else if (!strcmp(key, keywords[KEYWORD_HEADER].string))
+           keyword_local = KEYWORD_HEADER;
+       else if (!strcmp(key, keywords[KEYWORD_CVSHEADER].string))
+           keyword_local = KEYWORD_CVSHEADER;
+       else
+           error(1, 0, "Unknown LocalId mode: %s", key);
+    }
+    free(copy);
+}
 
+void
+RCS_setincexc (arg)
+    const char *arg;
+{
+    char *key;
+    char *copy, *next;
+    int include = 0;
+    struct rcs_keyword *keyword;
+
+    copy = xstrdup(arg);
+    next = copy;
+    switch (*next++) {
+       case 'e':
+           include = 0;
+           break;
+       case 'i':
+           include = 1;
+           break;
+       default:
+           free(copy);
+           return;
+    }
+
+    if (include)
+       for (keyword = keywords; keyword->string != NULL; keyword++)
+       {
+           keyword->expandit = 0;
+       }
+
+    key = strtok(next, ",");
+    while (key) {
+       for (keyword = keywords; keyword->string != NULL; keyword++) {
+           if (strcmp (keyword->string, key) == 0)
+               keyword->expandit = include;
+       }
+       key = strtok(NULL, ",");
+    }
+    free(copy);
+    return;
+}
+
+#define ATTIC "/" CVSATTIC
+static char *
+getfullCVSname(CVSname, pathstore)
+    char *CVSname, **pathstore;
+{
+    if (current_parsed_root->directory) {
+       int rootlen;
+       char *c = NULL;
+       int alen = sizeof(ATTIC) - 1;
+
+       *pathstore = xstrdup(CVSname);
+       if ((c = strrchr(*pathstore, '/')) != NULL) {
+           if (c - *pathstore >= alen) {
+               if (!strncmp(c - alen, ATTIC, alen)) {
+                   while (*c != '\0') {
+                       *(c - alen) = *c;
+                       c++;
+                   }
+                   *(c - alen) = '\0';
+               }
+           }
+       }
+
+       rootlen = strlen(current_parsed_root->directory);
+       if (!strncmp(*pathstore, current_parsed_root->directory, rootlen) &&
+           (*pathstore)[rootlen] == '/')
+           CVSname = (*pathstore + rootlen + 1);
+       else
+           CVSname = (*pathstore);
+    }
+    return CVSname;
+}
 
 /* vim:tabstop=8:shiftwidth=4
  */
Index: src/rcs.h
===================================================================
RCS file: /cvs/ccvs/src/rcs.h,v
retrieving revision 1.59
diff -u -p -r1.59 rcs.h
--- src/rcs.h   7 Feb 2003 19:53:30 -0000       1.59
+++ src/rcs.h   26 May 2003 20:27:34 -0000
@@ -240,6 +240,8 @@ int rcs_change_text PROTO ((const char *
 void RCS_deltas PROTO ((RCSNode *, FILE *, struct rcsbuffer *, char *,
                        enum rcs_delta_op, char **, size_t *,
                        char **, size_t *));
+void RCS_setincexc PROTO ((const char *arg));
+void RCS_setlocalid PROTO ((const char *arg));
 char *make_file_label PROTO ((char *, char *, RCSNode *));
 
 extern int preserve_perms;
Index: src/sanity.sh
===================================================================
RCS file: /cvs/ccvs/src/sanity.sh,v
retrieving revision 1.797
diff -u -p -r1.797 sanity.sh
--- src/sanity.sh       23 May 2003 19:09:56 -0000      1.797
+++ src/sanity.sh       26 May 2003 20:27:35 -0000
@@ -847,6 +847,7 @@ if test x"$*" = x; then
        tests="${tests} join-admin join-admin-2"
        tests="${tests} new newb conflicts conflicts2 conflicts3"
        tests="${tests} clean"
+       tests="${tests} keywordexpand"
        # Checking out various places (modules, checkout -d, &c)
        tests="${tests} modules modules2 modules3 modules4 modules5 modules6"
        tests="${tests} mkmodules-temp-file-removal"
@@ -9546,6 +9547,89 @@ fish"
          cd ../..
           rm -rf 1
          rm -rf ${CVSROOT_DIRNAME}/first-dir
+         ;;
+
+       keywordexpand)
+         # Tests of the original *BSD tag= and keywordexpand= features
+         # are done via the LocalKeyword= and KeywordExpand features.
+         mkdir keywordexpand; cd keywordexpand
+
+         dotest keywordexpand-1 "${testcvs} -q co CVSROOT" \
+'U CVSROOT/checkoutlist
+U CVSROOT/commitinfo
+U CVSROOT/config
+U CVSROOT/cvswrappers
+U CVSROOT/editinfo
+U CVSROOT/loginfo
+U CVSROOT/modules
+U CVSROOT/notify
+U CVSROOT/rcsinfo
+U CVSROOT/taginfo
+U CVSROOT/verifymsg'
+         cd CVSROOT
+         echo LocalKeyword=MyBSD=CVSHeader >> config
+         echo KeywordExpand=iMyBSD,Id >> config
+         dotest keywordexpand-2 "${testcvs} -Q ci -mkeywordexpand config" \
+"Checking in config;
+${CVSROOT_DIRNAME}/CVSROOT/config,v  <--  config
+new revision: 1\.2; previous revision: 1\.1
+done
+${PROG} [a-z]*: Rebuilding administrative file database"
+
+         cd ..
+
+         mkdir testimport; cd testimport
+         echo '$''Author$' > file1
+         echo '$''Date$' >> file1
+         echo '$''CVSHeader$' >> file1
+         echo '$''Header$' >> file1
+         echo '$''Id$' >> file1
+         echo '$''Locker$' >> file1
+         echo '$''Log$' >> file1
+         echo '$''Name$' >> file1
+         echo '$''RCSfile$' >> file1
+         echo '$''Revision$' >> file1
+         echo '$''Source$' >> file1
+         echo '$''State$' >> file1
+         echo '$''MyBSD$' >> file1
+         dotest keywordexpand-3 \
+"${testcvs} -Q import -I ! -m test-import-with-bsd-keyword keywordexpand 
vendor v1" \
+''
+         cd ..
+
+         dotest keywordexpand-4 "${testcvs} -Q checkout keywordexpand" ''
+         cd keywordexpand
+         dotest keywordexpand-5 "cat file1" \
+"\$""Author\$
+\$""Date\$
+\$""CVSHeader\$
+\$""Header\$
+\$""Id: file1,v 1\.1\.1\.1 [0-9/]* [0-9:]* ${username} Exp \$
+\$""Locker\$
+\$""Log\$
+\$""Name\$
+\$""RCSfile\$
+\$""Revision\$
+\$""Source\$
+\$""State\$
+\$MyBSD: keywordexpand/file1,v 1\.1\.1\.1 [0-9/]* [0-9:]* ${username} Exp \$"
+         echo 'a change' >> file1
+         dotest keywordexpand-6 "${testcvs} -Q ci -madd" \
+"Checking in file1;
+${CVSROOT_DIRNAME}/keywordexpand/file1,v  <--  file1
+new revision: 1\.2; previous revision: 1\.1
+done"
+         cd ..
+
+         dokeep
+
+         # Done. Clean up.
+         cd ..
+         rm -rf ${TESTDIR}/keywordexpand \
+                ${CVSROOT_DIRNAME}/keywordexpand
+         rm -f ${CVSROOT_DIRNAME}/CVSROOT/config,v \
+                ${CVSROOT_DIRNAME}/CVSROOT/config
+         dotest keywordexpand-cleanup-1 "${testcvs} init" ''
          ;;
 
        modules)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]