cvs-cvs
[Top][All Lists]
Advanced

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

[Cvs-cvs] ccvs docChangeLog doccvs.texinfo docversion.tex...


From: Mark D. Baushke
Subject: [Cvs-cvs] ccvs docChangeLog doccvs.texinfo docversion.tex...
Date: Fri, 09 Jun 2006 21:28:18 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Changes by:     Mark D. Baushke <mdb>   06/06/09 21:28:17

Modified files:
        doc            : ChangeLog cvs.texinfo version.texi 
        src            : ChangeLog admin.c history.c history.h sanity.sh 

Log message:
        * doc/cvs.texinfo (config): Add the new 'X' record type for the
        LogHistory option.
        (history options): Descripe the 'X' record type.
        
        * src/admin.c (admin_fileproc): Used by NetBSD, add 'X' to the
        pantheon of history record types to keep "cvs admin" command
        information.
        * src/history.c: Document addition of the 'X' history record type.
        (report_hrecs): Add support for printing the 'X' record type.
        * src/history.h (ALL_HISTORY_REC_TYPES): Add 'X' to the list.
        * src/sanity.sh (history, modes): Add tests for 'X' record types.
        (conflicts4-11r, conflicts4-13r): Fix expectations for remote and
        proxy where $TESTDIR may not be default.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ccvs/doc/ChangeLog?cvsroot=cvs&r1=1.963&r2=1.964
http://cvs.savannah.gnu.org/viewcvs/ccvs/doc/cvs.texinfo?cvsroot=cvs&r1=1.688&r2=1.689
http://cvs.savannah.gnu.org/viewcvs/ccvs/doc/version.texi?cvsroot=cvs&r1=1.189&r2=1.190
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/ChangeLog?cvsroot=cvs&r1=1.3443&r2=1.3444
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/admin.c?cvsroot=cvs&r1=1.114&r2=1.115
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/history.c?cvsroot=cvs&r1=1.97&r2=1.98
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/history.h?cvsroot=cvs&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/ccvs/src/sanity.sh?cvsroot=cvs&r1=1.1151&r2=1.1152

Patches:
Index: doc/ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/doc/ChangeLog,v
retrieving revision 1.963
retrieving revision 1.964
diff -u -b -r1.963 -r1.964
--- doc/ChangeLog       8 Jun 2006 21:07:31 -0000       1.963
+++ doc/ChangeLog       9 Jun 2006 21:28:17 -0000       1.964
@@ -1,3 +1,10 @@
+2006-06-09  Mark D. Baushke  <address@hidden>
+
+       * cvs.texinfo (config): Add the new 'X' record type for the
+       LogHistory option.
+       (history options): Descripe the 'X' record type.
+       * version.texi: Regenerated.
+
 2006-06-08  Derek Price  <address@hidden>
 
        * cvs.texinfo (OpenPGP Signed Commits): New node.

Index: doc/cvs.texinfo
===================================================================
RCS file: /cvsroot/cvs/ccvs/doc/cvs.texinfo,v
retrieving revision 1.688
retrieving revision 1.689
diff -u -b -r1.688 -r1.689
--- doc/cvs.texinfo     8 Jun 2006 21:07:31 -0000       1.688
+++ doc/cvs.texinfo     9 Jun 2006 21:28:17 -0000       1.689
@@ -10793,6 +10793,13 @@
 @item R
 A file was removed.
 @end table
+
address@hidden
+One record type results from the admin command:
address@hidden @code
address@hidden X
+The admin command.
address@hidden table
 @end table
 
 The options shown as @samp{-flags} constrain or expand
@@ -15157,7 +15164,7 @@
 @cindex LogHistory, in CVSROOT/config
 @item address@hidden
 Control what is logged to the @file{CVSROOT/history} file (@pxref{history}).
-Default of @samp{TOEFWUPCGMAR} (or simply @samp{all}) will log
+Default of @samp{TOEFWUPCGMARX} (or simply @samp{all}) will log
 all transactions.  Any subset of the default is
 legal.  (For example, to only log transactions that modify the
 @file{*,v} files, use @samp{LogHistory=TMAR}.)  To disable history logging

Index: doc/version.texi
===================================================================
RCS file: /cvsroot/cvs/ccvs/doc/version.texi,v
retrieving revision 1.189
retrieving revision 1.190
diff -u -b -r1.189 -r1.190
--- doc/version.texi    8 Jun 2006 21:07:31 -0000       1.189
+++ doc/version.texi    9 Jun 2006 21:28:17 -0000       1.190
@@ -1,4 +1,4 @@
address@hidden UPDATED 8 June 2006
address@hidden UPDATED 9 June 2006
 @set UPDATED-MONTH June 2006
 @set EDITION 1.12.13.1
 @set VERSION 1.12.13.1

Index: src/ChangeLog
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/ChangeLog,v
retrieving revision 1.3443
retrieving revision 1.3444
diff -u -b -r1.3443 -r1.3444
--- src/ChangeLog       9 Jun 2006 02:11:24 -0000       1.3443
+++ src/ChangeLog       9 Jun 2006 21:28:17 -0000       1.3444
@@ -1,3 +1,15 @@
+2006-06-09  Mark D. Baushke  <address@hidden>
+
+       * admin.c (admin_fileproc): Used by NetBSD, add 'X' to the
+       pantheon of history record types to keep "cvs admin" command
+       information.
+       * history.c: Document addition of the 'X' history record type.
+       (report_hrecs): Add support for printing the 'X' record type.
+       * history.h (ALL_HISTORY_REC_TYPES): Add 'X' to the list.
+       * sanity.sh (history, modes): Add tests for 'X' record types.
+       (conflicts4-11r, conflicts4-13r): Fix expectations for remote and
+       proxy where $TESTDIR may not be default.
+       
 2006-06-08  Derek Price  <address@hidden>
 
        * sanity.sh (conflicts4): Test that the client honors Empty-conflicts.

Index: src/admin.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/admin.c,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -b -r1.114 -r1.115
--- src/admin.c 16 May 2006 01:30:34 -0000      1.114
+++ src/admin.c 9 Jun 2006 21:28:17 -0000       1.115
@@ -122,6 +122,10 @@
     int ac;
     char **av;
     int av_alloc;
+
+    /* This contains a printable version of the command line used
+       for logging. */
+    char *cmdline;
 };
 
 /* Add an argument.  OPT is the option letter, e.g. 'a'.  ARG is the
@@ -332,6 +336,75 @@
 
 
 
+static size_t
+wescape(char *dst, const char *src)
+{
+    const unsigned char *s = src;
+    char *d = dst;
+    for (; *s; s++) {
+       if (!isprint (*s) || isspace (*s) || *s == '|') {
+           /* These next four statements are the same as:
+            *   d += sprintf(d, "\\%03o", *s);
+            * but do not make assumptions that sprintf does the right
+            * thing with regard to the integer it returns.
+            */
+           /* Convert special characters to octal */
+           *d++ = '\\';
+           *d++ = ((*s >> 6) & 3) + '0';
+           *d++ = ((*s >> 3) & 7) + '0';
+           *d++ = ((*s >> 0) & 7) + '0';
+       } else  {
+           *d++ = *s;
+       }
+    }
+    *d = '\0';
+    return d - dst;
+}
+
+
+
+static char *
+makecmdline (int argc, char **argv)
+{
+    size_t clen = 1024, wlen = 1024, len, cpos = 0, i;
+    char *cmd = xmalloc (clen);
+    char *word = xmalloc (wlen);
+
+    for (i = 0; i < argc; i++) {
+       char *arg = argv[i];
+       if (i == 0)
+       {
+           if (strncmp (argv[i], "cvs server", 10) == 0)
+               arg = "admin";
+           else if (strncmp (argv[i], "cvs ", 4) == 0)
+               arg = argv[i] + 4;
+       }
+
+       len = strlen (arg);
+       if (len * 4 < wlen) {
+           wlen += len * 4;
+           word = xrealloc (word, wlen);
+       }
+       len = wescape (word, arg);
+       if (clen - cpos < len + 2) {
+           clen += len + 2;
+           cmd = xrealloc (cmd, clen);
+       }
+       memcpy (&cmd[cpos], word, len);
+       cpos += len;
+       cmd[cpos++] = ' ';
+    }
+    if (cpos != 0)
+       cmd[cpos - 1] = '\0';
+    else
+       cmd[cpos] = '\0';
+    free (word);
+
+    return cmd;
+}
+
+
+
 int
 admin (int argc, char **argv)
 {
@@ -347,6 +420,7 @@
     wrap_setup ();
 
     memset (&admin_data, 0, sizeof admin_data);
+    admin_data.cmdline = makecmdline (argc, argv);
 
     /* TODO: get rid of `-' switch notation in admin_data.  For
        example, admin_data->branch should be not `-bfoo' but simply `foo'. */
@@ -735,6 +809,9 @@
        goto exitfunc;
     }
 
+    history_write ('X', finfo->update_dir, admin_data->cmdline, finfo->file,
+                  finfo->repository);
+
     rcs = vers->srcfile;
     if (rcs == NULL)
     {

Index: src/history.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/history.c,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -b -r1.97 -r1.98
--- src/history.c       24 Apr 2006 18:50:26 -0000      1.97
+++ src/history.c       9 Jun 2006 21:28:17 -0000       1.98
@@ -54,6 +54,7 @@
  *             M       "Commit" cmd - "Modified" file.
  *             A       "Commit" cmd - "Added" file.
  *             R       "Commit" cmd - "Removed" file.
+ *             X       "Admin"  cmd.
  *
  *  date       is a fixed length 8-char hex representation of a Unix time_t.
  *             [Starting here, variable fields are delimited by '|' chars.]
@@ -88,7 +89,7 @@
  *
  *   Extract list of record types
  *
- *     -e, -x [TOEFWUPGCMAR]
+ *     -e, -x [TOEFWUPGCMARX]
  *
  *             Extracted records are simply printed, No analysis is performed.
  *             All "field" modifiers apply.  -e chooses all types.
@@ -1632,6 +1633,7 @@
            case 'M':
            case 'A':
            case 'R':
+           case 'X':
                (void) printf (" %-*s %-*s %-*s =%s= %s", rev_len, lr->rev,
                               file_len, lr->file, repos_len, repos,
                               lr->mod ? lr->mod : "", workdir);

Index: src/history.h
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/history.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- src/history.h       1 Feb 2005 22:20:06 -0000       1.4
+++ src/history.h       9 Jun 2006 21:28:17 -0000       1.5
@@ -14,5 +14,5 @@
 
 #ifndef HISTORY_H
 # define HISTORY_H
-#define ALL_HISTORY_REC_TYPES "TOEFWUPCGMAR"
+#define ALL_HISTORY_REC_TYPES "TOEFWUPCGMARX"
 #endif /* HISTORY_H */

Index: src/sanity.sh
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/sanity.sh,v
retrieving revision 1.1151
retrieving revision 1.1152
diff -u -b -r1.1151 -r1.1152
--- src/sanity.sh       9 Jun 2006 02:11:24 -0000       1.1151
+++ src/sanity.sh       9 Jun 2006 21:28:17 -0000       1.1152
@@ -12407,7 +12407,7 @@
 "$DOTSTAR
 Argument --
 Directory .
-/tmp/cvs-sanity/cvsroot/first-dir
+$DOTSTAR/first-dir
 Entry /file1/1.2/+=//
 Modified file1
 u=rw,g=rw,o=r
@@ -12441,7 +12441,7 @@
 "$DOTSTAR
 Argument --
 Directory .
-/tmp/cvs-sanity/cvsroot/first-dir
+$DOTSTAR/first-dir
 Entry /file1/1.2/+=//
 Unchanged file1
 update"
@@ -24279,6 +24279,7 @@
 W33a6eada|anonymous|<remote>*4|ccvs/emx||Makefile.in
 C3b235f50|kingdon|<remote>|ccvs/emx|1.3|README
 M3b23af50|kingdon|~/work/*0|ccvs/doc|1.281|cvs.texinfo
+X4486a391|mdb|~/work/*0|ccvs|admin --execute aa|aa
 EOF
 
          dotest history-1 "${testcvs} history -e -a" \
@@ -24290,16 +24291,19 @@
 M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity\.sh   ccvs/src == 
~/work/ccvs/src
 C 2001-06-10 11:51 ${PLUS}0000 kingdon   1\.3   README      ccvs/emx == 
<remote>
 M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc
+X 2006-06-07 09:59 +0000 mdb       admin --execute aa aa          ccvs     == 
~/work/ccvs
 M 1997-06-10 01:36 ${PLUS}0000 nk        1\.229 sanity\.sh   ccvs/src == 
<remote>"
 
          dotest history-2 "${testcvs} history -e -a -D '10 Jun 1997 13:00 UT'" 
\
 "W 1997-06-17 19:51 ${PLUS}0000 anonymous       Makefile\.in ccvs/emx == 
<remote>/emx
 M 1997-06-10 21:12 ${PLUS}0000 kingdon   1\.231 sanity\.sh   ccvs/src == 
~/work/ccvs/src
 C 2001-06-10 11:51 ${PLUS}0000 kingdon   1\.3   README      ccvs/emx == 
<remote>
-M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc"
+M 2001-06-10 17:33 ${PLUS}0000 kingdon   1\.281              cvs\.texinfo 
ccvs/doc == ~/work/ccvs/doc
+X 2006-06-07 09:59 +0000 mdb       admin --execute aa aa          ccvs     == 
~/work/ccvs"
 
          dotest history-3 "${testcvs} history -e -a -D '10 Jun 2001 13:00 UT'" 
\
-"M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281 cvs\.texinfo ccvs/doc == 
~/work/ccvs/doc"
+ "M 2001-06-10 17:33 ${PLUS}0000 kingdon 1\.281              cvs\.texinfo 
ccvs/doc == ~/work/ccvs/doc
+X 2006-06-07 09:59 +0000 mdb     admin --execute aa aa          ccvs     == 
~/work/ccvs"
 
          dotest history-4 "${testcvs} history -ac sanity.sh" \
 "M 1997-06-10 21:12 ${PLUS}0000 kingdon 1\.231 sanity\.sh ccvs/src == 
~/work/ccvs/src
@@ -24424,6 +24428,10 @@
          # is running the tests doesn't have CVSUMASK set.
          #export -n CVSUMASK # if unset, defaults to 002
 
+         # First empty the history file
+         modify_repo rm -rf $CVSROOT_DIRNAME/CVSROOT/history
+         modify_repo touch $CVSROOT_DIRNAME/CVSROOT/history
+
          save_umask=`umask`
          umask 077
          mkdir 1; cd 1
@@ -24499,6 +24507,11 @@
          dotest modes-execute-1 "${testcvs} admin --execute aa" \
 "RCS file: $CVSROOT_DIRNAME/first-dir/aa,v
 done"
+
+         dotest modes-execute-1h "${testcvs} history -x X" \
+"X ${ISODATE} ${username} admin --execute aa ${DOTSTAR}aa first-dir == 
${TESTDIR}/1/first-dir" \
+"X ${ISODATE} ${username} admin --execute -- aa ${DOTSTAR}aa first-dir == 
<remote>"
+
          # Cygwin.
          if test -n "$remotehost"; then
            dotest modes-execute-2r \




reply via email to

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