cvs-cvs
[Top][All Lists]
Advanced

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

[Cvs-cvs] ccvs/src ChangeLog base.c client.c diff.c entri... [signed-com


From: Derek Robert Price
Subject: [Cvs-cvs] ccvs/src ChangeLog base.c client.c diff.c entri... [signed-commits3]
Date: Fri, 20 Jan 2006 21:29:57 +0000

CVSROOT:        /cvsroot/cvs
Module name:    ccvs
Branch:         signed-commits3
Changes by:     Derek Robert Price <address@hidden>     06/01/20 21:29:56

Modified files:
        src            : ChangeLog base.c client.c diff.c entries.c 
                         rcs.c rcs.h sanity.sh server.c server.h 
                         vers_ts.c 

Log message:
        * base.c (base_diff): Handle client/server mode.
        * client.c (base_copy): Expand header comment.
        (client_base_diff, handle_base_diff): New function.
        (responses): Add Base-diff.
        * diff.c (diff_mark_errors): Export.
        (empty_files): s/int/bool/.
        (diff_fileproc): Reduce verbosity.  Avoid passing `-' as part of a
        revision number.  Pass time stamp to make_file_label when available.
        (get_diff_info): New function.
        * entries.c: Add traces.
        * rcs.c (make_file_label), rcs.h: Accept time stamp as an argument.
        * server.c (requests): Add Base-diff.
        (iserver_base_checkout): Always send temp files.
        (server_base_diff): Add new function.
        * server.h (server_base_diff): New proto.
        * vers_ts.c (time_stamp_server): Use a time stamp that won't match
        ts_rcs when the server is running without file contents.
        
        * sanity.sh: Update to compensate.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/ChangeLog.diff?only_with_tag=signed-commits3&tr1=1.3328.2.40&tr2=1.3328.2.41&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/base.c.diff?only_with_tag=signed-commits3&tr1=1.1.4.5&tr2=1.1.4.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/client.c.diff?only_with_tag=signed-commits3&tr1=1.438.2.13&tr2=1.438.2.14&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/diff.c.diff?only_with_tag=signed-commits3&tr1=1.116.6.7&tr2=1.116.6.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/entries.c.diff?only_with_tag=signed-commits3&tr1=1.66.6.3&tr2=1.66.6.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcs.c.diff?only_with_tag=signed-commits3&tr1=1.356.6.11&tr2=1.356.6.12&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/rcs.h.diff?only_with_tag=signed-commits3&tr1=1.82.8.7&tr2=1.82.8.8&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/sanity.sh.diff?only_with_tag=signed-commits3&tr1=1.1105.2.17&tr2=1.1105.2.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/server.c.diff?only_with_tag=signed-commits3&tr1=1.453.2.9&tr2=1.453.2.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/server.h.diff?only_with_tag=signed-commits3&tr1=1.44.6.4&tr2=1.44.6.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/src/vers_ts.c.diff?only_with_tag=signed-commits3&tr1=1.65.6.3&tr2=1.65.6.4&r1=text&r2=text

Patches:
Index: ccvs/src/ChangeLog
diff -u ccvs/src/ChangeLog:1.3328.2.40 ccvs/src/ChangeLog:1.3328.2.41
--- ccvs/src/ChangeLog:1.3328.2.40      Fri Jan 20 03:12:29 2006
+++ ccvs/src/ChangeLog  Fri Jan 20 21:29:55 2006
@@ -1,3 +1,25 @@
+2006-01-20  Derek Price  <address@hidden>
+
+       * base.c (base_diff): Handle client/server mode.
+       * client.c (base_copy): Expand header comment.
+       (client_base_diff, handle_base_diff): New function.
+       (responses): Add Base-diff.
+       * diff.c (diff_mark_errors): Export.
+       (empty_files): s/int/bool/.
+       (diff_fileproc): Reduce verbosity.  Avoid passing `-' as part of a
+       revision number.  Pass time stamp to make_file_label when available.
+       (get_diff_info): New function.
+       * entries.c: Add traces.
+       * rcs.c (make_file_label), rcs.h: Accept time stamp as an argument.
+       * server.c (requests): Add Base-diff.
+       (iserver_base_checkout): Always send temp files.
+       (server_base_diff): Add new function.
+       * server.h (server_base_diff): New proto.
+       * vers_ts.c (time_stamp_server): Use a time stamp that won't match
+       ts_rcs when the server is running without file contents.
+
+       * sanity.sh: Update to compensate.
+       
 2006-01-19  Derek Price  <address@hidden>
 
        * diff.c (have_rev1_label, have_rev2_label): Make boolean.
Index: ccvs/src/base.c
diff -u ccvs/src/base.c:1.1.4.5 ccvs/src/base.c:1.1.4.6
--- ccvs/src/base.c:1.1.4.5     Fri Jan 20 03:12:29 2006
+++ ccvs/src/base.c     Fri Jan 20 21:29:55 2006
@@ -592,25 +592,37 @@
           const char *f2, const char *use_rev2, const char *label2,
           bool empty_files)
 {
-    int status, err = 2;
+    int status, err;
 
-    RCS_output_diff_options (diff_argc, diff_argv, empty_files,
-                            use_rev1, use_rev2, finfo->file);
-
-    status = diff_exec (f1, f2, label1, label2, diff_argc, diff_argv, RUN_TTY);
+    if (server_use_bases ())
+    {
+       server_base_diff (finfo, f1, use_rev1, label1, f2, use_rev2, label2);
 
-    switch (status)
+       err = 0;
+    }
+    else if (xcmp (f1, f2))
     {
-       case -1:                        /* fork failed */
-           error (1, errno, "fork failed while diffing %s",
-                  finfo->fullname);
-       case 0:                         /* everything ok */
-           err = 0;
-           break;
-       default:                        /* other error */
-           err = status;
-           break;
+       RCS_output_diff_options (diff_argc, diff_argv, empty_files,
+                                use_rev1, use_rev2, finfo->fullname);
+
+       status = diff_exec (f1, f2, label1, label2, diff_argc, diff_argv,
+                           RUN_TTY);
+
+       switch (status)
+       {
+           case -1:                    /* fork failed */
+               error (1, errno, "fork failed while diffing %s",
+                      finfo->fullname);
+           case 0:                             /* everything ok */
+               err = 0;
+               break;
+           default:                    /* other error */
+               err = status;
+               break;
+       }
     }
+    else
+       err = 0;
 
     return err;
 }
Index: ccvs/src/client.c
diff -u ccvs/src/client.c:1.438.2.13 ccvs/src/client.c:1.438.2.14
--- ccvs/src/client.c:1.438.2.13        Wed Jan 18 06:18:48 2006
+++ ccvs/src/client.c   Fri Jan 20 21:29:55 2006
@@ -30,6 +30,7 @@
 /* CVS headers.  */
 #include "base.h"
 #include "buffer.h"
+#include "diff.h"
 #include "difflib.h"
 #include "edit.h"
 #include "gpg.h"
@@ -2551,7 +2552,14 @@
 
 
 
-/* Create am up-to-date temporary workfile from a base file.  */
+/* Create am up-to-date temporary workfile from a base file.
+ *
+ * NOTES
+ *   Base-copy needs to be able to copy temp files in the case of a join which
+ *   adds a file.  Though keeping a base file in this case could potentially
+ *   be interesting, this is not what certain portions of the code currently
+ *   expect.
+ */
 static void
 client_base_copy (void *data_arg, List *ent_list, const char *short_pathname,
                  const char *filename)
@@ -2813,6 +2821,135 @@
 
 
 static void
+client_base_diff (void *data_arg, List *ent_list, const char *short_pathname,
+                 const char *filename)
+{
+    struct diff_info *di = data_arg;
+    struct file_info finfo;
+    char *ft1, *ft2, *rev1, *rev2, *label1, *label2;
+    const char *f1 = NULL, *f2 = NULL;
+    bool used_t1 = false, used_t2 = false;
+
+    read_line (&ft1);
+
+    read_line (&rev1);
+    if (!*rev1)
+    {
+       free (rev1);
+       rev1 = NULL;
+    }
+
+    read_line (&label1);
+    if (!*label1)
+    {
+       free (label1);
+       label1 = NULL;
+    }
+
+    read_line (&ft2);
+
+    read_line (&rev2);
+    if (!*rev2)
+    {
+       free (rev2);
+       rev2 = NULL;
+    }
+
+    read_line (&label2);
+    if (!*label2)
+    {
+       free (label2);
+       label2 = NULL;
+    }
+
+    if (!strcmp (ft1, "TEMP"))
+    {
+       if (!temp_checkout1)
+           error (1, 0,
+                  "Server failed to send enough files before Base-diff.");
+       f1 = temp_checkout1;
+
+       used_t1 = true;
+    }
+    else if (!strcmp (ft1, "DEVNULL"))
+       f1 = DEVNULL;
+    else
+       error (1, 0, "Server sent unrecognized diff file type (`%s')", ft1);
+
+    if (!strcmp (ft2, "TEMP"))
+    {
+       if ((used_t1 && !temp_checkout2) || (!used_t1 && !temp_checkout1))
+           error (1, 0,
+                  "Server failed to send enough files before Base-diff.");
+
+       if (used_t1)
+       {
+           f2 = temp_checkout2;
+           used_t2 = true;
+       }
+       else
+       {
+           f2 = temp_checkout1;
+           used_t1 = true;
+       }
+    }
+    else if (!strcmp (ft2, "DEVNULL"))
+       f2 = DEVNULL;
+    else if (!strcmp (ft2, "WORKFILE"))
+       f2 = filename;
+    else
+       error (1, 0, "Server sent unrecognized diff file type (`%s')", ft2);
+
+    if ((!used_t1 && temp_checkout1)
+       || (!used_t2 && temp_checkout2))
+       error (1, 0, "Unused temp files sent from server before Base-diff.");
+
+    finfo.file = filename;
+    finfo.fullname = short_pathname;
+
+    diff_mark_errors (base_diff (&finfo, di->diff_argc, di->diff_argv,
+                                f1, rev1, label1, f2,
+                                rev2, label2, di->empty_files));
+
+    if (ft1) free (ft1);
+    if (ft2) free (ft2);
+    if (rev1) free (rev1);
+    if (rev2) free (rev2);
+    if (label1) free (label1);
+    if (label2) free (label2);
+    if (temp_checkout1)
+    {
+       char *tmp = temp_checkout1;
+       temp_checkout1 = NULL;
+       if (CVS_UNLINK (tmp) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", tmp);
+       free (tmp);
+    }
+    if (temp_checkout2)
+    {
+       char *tmp = temp_checkout2;
+       temp_checkout2 = NULL;
+       if (CVS_UNLINK (tmp) < 0)
+           error (0, errno, "Failed to remove temp file `%s'", tmp);
+       free (tmp);
+    }
+
+    return;
+}
+
+
+
+static void
+handle_base_diff (char *args, size_t len)
+{
+    if (suppress_bases)
+       error (1, 0, "Server sent Base-* response when asked not to.");
+    call_in_directory (args, client_base_diff, get_diff_info ());
+}
+
+
+
+static void
 remove_entry (void *data, List *ent_list, const char *short_pathname,
               const char *filename)
 {
@@ -3900,14 +4037,14 @@
             rs_optional),
     RSP_LINE("Temp-checkout", handle_temp_checkout, response_type_normal,
             rs_optional),
-    RSP_LINE("Base-copy", handle_base_copy, response_type_normal,
-            rs_optional),
+    RSP_LINE("Base-copy", handle_base_copy, response_type_normal, rs_optional),
     RSP_LINE("Base-merge", handle_base_merge, response_type_normal,
             rs_optional),
     RSP_LINE("Base-entry", handle_base_entry, response_type_normal,
             rs_optional),
     RSP_LINE("Base-merged", handle_base_merged, response_type_normal,
             rs_optional),
+    RSP_LINE("Base-diff", handle_base_diff, response_type_normal, rs_optional),
 
     RSP_LINE("Base-signatures", handle_base_signatures, response_type_normal,
             rs_optional),
Index: ccvs/src/diff.c
diff -u ccvs/src/diff.c:1.116.6.7 ccvs/src/diff.c:1.116.6.8
--- ccvs/src/diff.c:1.116.6.7   Fri Jan 20 03:12:29 2006
+++ ccvs/src/diff.c     Fri Jan 20 21:29:55 2006
@@ -23,6 +23,9 @@
 # include <config.h>
 #endif
 
+/* Verify interface.  */
+#include "diff.h"
+
 /* CVS headers.  */
 #include "base.h"
 #include "ignore.h"
@@ -54,7 +57,6 @@
                               int err, const char *update_dir,
                               List *entries);
 static int diff_fileproc (void *callerdat, struct file_info *finfo);
-static void diff_mark_errors (int err);
 
 
 /* Global variables.  Would be cleaner if we just put this stuff in a
@@ -75,7 +77,7 @@
 static int diff_argc;
 static size_t diff_arg_allocated;
 static int diff_errors;
-static int empty_files;
+static bool empty_files;
 
 static const char *const diff_usage[] =
 {
@@ -398,7 +400,7 @@
                    diff_date1 = Make_Date (optarg);
                break;
            case 'N':
-               empty_files = 1;
+               empty_files = true;
                break;
            case '?':
            default:
@@ -454,7 +456,7 @@
         err = get_responses_and_close ();
        free (options);
        options = NULL;
-       return err;
+       return diff_errors ? diff_errors : err;
     }
 #endif
 
@@ -905,7 +907,6 @@
        }
     }
 
-    
     empty_file = diff_file_nodiff (finfo, vers, empty_file, &rev1_cache,
                                   diff_rev1 && !isdigit (diff_rev1[0])
                                   ? diff_rev1 : vers->tag,
@@ -925,27 +926,6 @@
     else if (empty_file == DIFF_ERROR)
        goto out;
 
-    /* Output an "Index:" line for patch to use */
-    cvs_output ("Index: ", 0);
-    cvs_output (finfo->fullname, 0);
-    cvs_output ("\n", 1);
-
-    /* Print a header for each file.  */
-    cvs_output (
-"===================================================================\n",
-               0);
-    if (finfo->rcs)
-    {
-       cvs_output ("RCS file: ", 0);
-       cvs_output (finfo->rcs->print_path, 0);
-    }
-    else
-    {
-       cvs_output ("File: ", 0);
-       cvs_output (finfo->fullname, 0);
-    }
-    cvs_output ("\n", 1);
-
     if (empty_file == DIFF_ADDED)
        f1 = DEVNULL;
     else if (rev1_cache)
@@ -953,18 +933,14 @@
        /* If this is cached, temp_checkout was not called for the client.
         */
        assert (empty_file != DIFF_CLIENT);
-       cvs_output ("retrieving revision ", 0);
-       cvs_output (use_rev1, 0);
-       cvs_output ("\n", 1);
        f1 = rev1_cache;
     }
     else
     {
-       cvs_output ("retrieving revision ", 0);
-       cvs_output (use_rev1, 0);
-       cvs_output ("\n", 1);
-       f1 = temp_checkout (vers->srcfile, finfo, vers->vn_user, use_rev1,
-                           vers->tag,
+       f1 = temp_checkout (vers->srcfile, finfo,
+                           vers->vn_user && *(vers->vn_user) == '-'
+                           ? vers->vn_user + 1 : vers->vn_user,
+                           use_rev1, vers->tag,
                            diff_rev1 && !isdigit (diff_rev1[0])
                            ? diff_rev1 : vers->tag,
                            vers->options, *options ? options : vers->options);
@@ -976,11 +952,10 @@
        f2 = DEVNULL;
     else if (use_rev2)
     {
-       cvs_output ("retrieving revision ", 0);
-       cvs_output (use_rev2, 0);
-       cvs_output ("\n", 1);
-       f2 = temp_checkout (vers->srcfile, finfo, vers->vn_user, use_rev2,
-                           vers->tag,
+       f2 = temp_checkout (vers->srcfile, finfo,
+                           vers->vn_user && *(vers->vn_user) == '-'
+                           ? vers->vn_user + 1 : vers->vn_user,
+                           use_rev2, vers->tag,
                            diff_rev2 && !isdigit (diff_rev2[0])
                            ? diff_rev2 : NULL,
                            vers->options, *options ? options : vers->options);
@@ -1000,17 +975,17 @@
     if (!have_rev2_label)
     {
        if (empty_file == DIFF_REMOVED)
-           label2 = make_file_label (DEVNULL, NULL, NULL);
+           label2 = make_file_label (DEVNULL, NULL, NULL, NULL);
        else
            label2 = make_file_label (finfo->fullname, use_rev2,
-                                     finfo->rcs);
+                                     vers->ts_user, finfo->rcs);
        if (!have_rev1_label)
        {
            if (empty_file == DIFF_ADDED)
-               label1 = make_file_label (DEVNULL, NULL, NULL);
+               label1 = make_file_label (DEVNULL, NULL, NULL, NULL);
            else
                label1 = make_file_label (finfo->fullname, use_rev1,
-                                         finfo->rcs);
+                                         NULL, finfo->rcs);
        }
     }
 
@@ -1057,7 +1032,7 @@
 /*
  * Remember the exit status for each file.
  */
-static void
+void
 diff_mark_errors (int err)
 {
     if (err > diff_errors)
@@ -1112,3 +1087,20 @@
 {
     return diff_errors;
 }
+
+
+
+struct diff_info *
+get_diff_info (void)
+{
+    static struct diff_info di;
+
+    if (strcmp ("diff", cvs_cmd_name))
+       return NULL;
+
+    di.diff_argc = diff_argc;
+    di.diff_argv = diff_argv;
+    di.empty_files = empty_files;
+
+    return &di;
+}
Index: ccvs/src/entries.c
diff -u ccvs/src/entries.c:1.66.6.3 ccvs/src/entries.c:1.66.6.4
--- ccvs/src/entries.c:1.66.6.3 Fri Jan  6 20:37:13 2006
+++ ccvs/src/entries.c  Fri Jan 20 21:29:55 2006
@@ -54,7 +54,11 @@
                 const char *date, const char *ts_conflict)
 {
     Entnode *ent;
-    
+ 
+    TRACE (TRACE_FLOW,
+          "Entnode_Create (%s, %s, %s, %s, %s, %s, %s)",
+          user, vn, ts, options, tag, date, ts_conflict);
+
     /* Note that timestamp and options must be non-NULL */
     ent = xmalloc (sizeof (Entnode));
     ent->type      = type;
@@ -461,6 +465,8 @@
     FILE *fpin;
     int sawdir;
 
+    TRACE (TRACE_FLOW, "EntriesOpen (%s)", update_dir);
+
     /* get a fresh list... */
     entries = getlist ();
 
@@ -596,6 +602,9 @@
 {
     Node *p;
 
+    TRACE (TRACE_FLOW, "AddEntryNode (%s, %s)",
+          entdata->user, entdata->timestamp);
+
     /* was it already there? */
     if ((p  = findnode_fn (list, entdata->user)) != NULL)
     {
Index: ccvs/src/rcs.c
diff -u ccvs/src/rcs.c:1.356.6.11 ccvs/src/rcs.c:1.356.6.12
--- ccvs/src/rcs.c:1.356.6.11   Fri Jan 20 03:12:29 2006
+++ ccvs/src/rcs.c      Fri Jan 20 21:29:55 2006
@@ -9013,7 +9013,8 @@
  * /dev/null to be parsed by patch properly.
  */
 char *
-make_file_label (const char *path, const char *rev, RCSNode *rcs)
+make_file_label (const char *path, const char *rev, const char *ts_user,
+                RCSNode *rcs)
 {
     char datebuf[MAXDATELEN + 1];
     char *label;
@@ -9022,33 +9023,33 @@
     {
        char date[MAXDATELEN + 1];
        /* revs cannot be attached to /dev/null ... duh. */
-       assert (strcmp(DEVNULL, path));
+       assert (strcmp (DEVNULL, path));
        RCS_getrevtime (rcs, rev, datebuf, 0);
        (void) date_to_internet (date, datebuf);
        label = Xasprintf ("-L%s\t%s\t%s", path, date, rev);
     }
-    else
+    else if (ts_user)
     {
-       struct stat sb;
-       struct tm *wm;
-
-       if (strcmp(DEVNULL, path))
+       if (strcmp (ts_user, "Is-modified"))
        {
-           const char *file = last_component (path);
-           if (stat (file, &sb) < 0)
-               /* Assume that if the stat fails,then the later read for the
-                * diff will too.
-                */
-               error (1, errno, "could not get info for `%s'", path);
-           wm = gmtime (&sb.st_mtime);
+           struct timespec t;
+           struct tm *wm;
+           assert (get_date (&t, ts_user, NULL));
+           wm = gmtime (&t.tv_sec);
+           tm_to_internet (datebuf, wm);
+           label = Xasprintf ("-L%s\t%s", path, datebuf);
        }
        else
-       {
-           time_t t = 0;
-           wm = gmtime(&t);
-       }
+           /* Can't get the user's timestamp from the server.  */
+           label = Xasprintf ("-L%s", path);
+    }
+    else
+    {
+       time_t t = 0;
+       struct tm *wm = gmtime (&t);
 
-       (void) tm_to_internet (datebuf, wm);
+       assert (!strcmp (DEVNULL, path));
+       tm_to_internet (datebuf, wm);
        label = Xasprintf ("-L%s\t%s", path, datebuf);
     }
     return label;
Index: ccvs/src/rcs.h
diff -u ccvs/src/rcs.h:1.82.8.7 ccvs/src/rcs.h:1.82.8.8
--- ccvs/src/rcs.h:1.82.8.7     Fri Jan 20 03:12:29 2006
+++ ccvs/src/rcs.h      Fri Jan 20 21:29:55 2006
@@ -304,7 +304,7 @@
                 char **, size_t *);
 void RCS_setincexc (void **, const char *arg);
 void RCS_setlocalid (const char *, unsigned int, void **, const char *arg);
-char *make_file_label (const char *, const char *, RCSNode *);
+char *make_file_label (const char *, const char *, const char *, RCSNode *);
 
 extern bool preserve_perms;
 
Index: ccvs/src/sanity.sh
diff -u ccvs/src/sanity.sh:1.1105.2.17 ccvs/src/sanity.sh:1.1105.2.18
--- ccvs/src/sanity.sh:1.1105.2.17      Thu Jan 19 19:39:40 2006
+++ ccvs/src/sanity.sh  Fri Jan 20 21:29:55 2006
@@ -508,6 +508,11 @@
 
 # Regexp to match a date in RFC822 format (as amended by RFC1123).
 RFCDATE="[a-zA-Z0-9 ][a-zA-Z0-9 ]* [0-9:][0-9:]* -0000"
+if $remote; then
+  LOCAL_RFCDATE=
+else
+  LOCAL_RFCDATE="      $RFCDATE"
+fi
 RFCDATE_EPOCH="1 Jan 1970 00:00:00 -0000"
 
 # Special times used in touch -t commands and the regular expresions
@@ -3166,37 +3171,25 @@
          dotest basica-6 "${testcvs} -q update" ''
          echo "ssfile line 2" >>sdir/ssdir/ssfile
          dotest_fail basica-6.2 "${testcvs} -q diff -c" \
-"Index: sdir/ssdir/ssfile
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
-retrieving revision 1\.1
-diff -c -r1\.1 ssfile
+"diff -c -r1\.1 sdir/ssdir/ssfile
 \*\*\* sdir/ssdir/ssfile       ${RFCDATE}      1\.1
---- sdir/ssdir/ssfile  ${RFCDATE}
+--- sdir/ssdir/ssfile$LOCAL_RFCDATE
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
 \*\*\* 1 \*\*\*\*
 --- 1,2 ----
   ssfile
 ${PLUS} ssfile line 2"
          dotest_fail basica-6.3 "${testcvs} -q diff -c -rBASE" \
-"Index: sdir/ssdir/ssfile
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
-retrieving revision 1\.1
-diff -c -r1\.1 ssfile
+"diff -c -r1\.1 sdir/ssdir/ssfile
 \*\*\* sdir/ssdir/ssfile       ${RFCDATE}      1\.1
---- sdir/ssdir/ssfile  ${RFCDATE}
+--- sdir/ssdir/ssfile$LOCAL_RFCDATE
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
 \*\*\* 1 \*\*\*\*
 --- 1,2 ----
   ssfile
 ${PLUS} ssfile line 2"
          dotest_fail basica-6.4 "${testcvs} -q diff -c -rBASE -C3isacrowd" \
-"Index: sdir/ssdir/ssfile
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/sdir/ssdir/ssfile,v
-retrieving revision 1\.1
-diff -c -C 3isacrowd -r1\.1 ssfile
+"diff -c -C 3isacrowd -r1\.1 sdir/ssdir/ssfile
 ${SPROG} diff: invalid context length argument"
          dotest basica-7 "${testcvs} -q ci -m modify-it" \
 "$CVSROOT_DIRNAME/first-dir/sdir/ssdir/ssfile,v  <--  sdir/ssdir/ssfile
@@ -5924,11 +5917,7 @@
          echo "#include <winsock.h>" >abc
          # check the behavior of the --ifdef=MACRO option
          dotest_fail diff-7 "${testcvs} -q diff --ifdef=HAVE_WINSOCK_H" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.2
-diff --ifdef HAVE_WINSOCK_H -r1\.2 abc
+"diff --ifdef HAVE_WINSOCK_H -r1\.2 abc
 #ifndef HAVE_WINSOCK_H
 extern int gethostname ();
 #else /\* HAVE_WINSOCK_H \*/
@@ -5963,21 +5952,13 @@
          # change to line near EOF
          ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nsix")}' </dev/null >abc
          dotest_fail diffnl-100 "${testcvs} diff abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.1
-diff -r1\.1 abc
+"diff -r1\.1 abc
 5d4
 < five"
           dotest_fail diffnl-101 "${testcvs} diff -u abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.1
-diff -u -r1\.1 abc
+"diff -u -r1\.1 abc
 --- abc        ${RFCDATE}      1\.1
-+++ abc        ${RFCDATE}
++++ abc$LOCAL_RFCDATE
 @@ -2,5 +2,4 @@
  two
  three
@@ -5992,11 +5973,7 @@
           # Change to last line
          ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null 
>abc
           dotest_fail diffnl-200 "${testcvs} diff abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.2
-diff -r1\.2 abc
+"diff -r1\.2 abc
 5c5
 < six
 \\\\ No newline at end of file
@@ -6004,13 +5981,9 @@
 > seven
 \\\\ No newline at end of file"
          dotest_fail diffnl-201 "${testcvs} diff -u abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.2
-diff -u -r1\.2 abc
+"diff -u -r1\.2 abc
 --- abc        ${RFCDATE}      1\.2
-+++ abc        ${RFCDATE}
++++ abc$LOCAL_RFCDATE
 @@ -2,4 +2,4 @@
  two
  three
@@ -6030,24 +6003,16 @@
 four
 seven" > abc
          dotest_fail diffnl-300 "${testcvs} diff abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.3
-diff -r1\.3 abc
+"diff -r1\.3 abc
 5c5
 < seven
 \\\\ No newline at end of file
 ---
 > seven"
          dotest_fail diffnl-301 "${testcvs} diff -u abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.3
-diff -u -r1\.3 abc
+"diff -u -r1\.3 abc
 --- abc        ${RFCDATE}      1\.3
-+++ abc        ${RFCDATE}
++++ abc$LOCAL_RFCDATE
 @@ -2,4 +2,4 @@
  two
  three
@@ -6062,24 +6027,16 @@
          # Removal of newline
          ${AWK} 'BEGIN {printf("one\ntwo\nthree\nfour\nseven")}' </dev/null 
>abc
          dotest_fail diffnl-400 "${testcvs} diff abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.4
-diff -r1\.4 abc
+"diff -r1\.4 abc
 5c5
 < seven
 ---
 > seven
 \\\\ No newline at end of file"
          dotest_fail diffnl-401 "${testcvs} diff -u abc" \
-"Index: abc
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/abc,v
-retrieving revision 1\.4
-diff -u -r1\.4 abc
+"diff -u -r1\.4 abc
 --- abc        ${RFCDATE}      1\.4
-+++ abc        ${RFCDATE}
++++ abc$LOCAL_RFCDATE
 @@ -2,4 +2,4 @@
  two
  three
@@ -6435,13 +6392,8 @@
          # Test diff of the removed file before it is committed.
          dotest_fail death2-diff-1 "${testcvs} -q diff file1" \
 "${SPROG} diff: file1 was removed, no comparison available"
-
          dotest_fail death2-diff-2 "${testcvs} -q diff -N -c file1" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -c -N -r1\.1 file1
+"diff -c -N -r1\.1 file1
 \*\*\* file1   ${RFCDATE}      [0-9.]*
 --- /dev/null  ${RFCDATE_EPOCH}
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6463,14 +6415,9 @@
 "${testcvs} -q diff -rbranch -r1.1 -c file1" \
 "${SPROG} diff: Tag branch refers to a dead (removed) revision in file 
.file1.\.
 ${SPROG} diff: No comparison available\.  Pass .-N. to .${SPROG} 
diff.${QUESTION}"
-
          dotest_fail death2-diff-4 \
 "${testcvs} -q diff -r1.1 -rbranch -N -c file1" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -c -N -r1\.1 -r1\.1\.2\.1
+"diff -c -N -r1\.1 -r1\.1\.2\.1
 \*\*\* file1   ${RFCDATE}      [0-9.]*
 --- /dev/null  ${RFCDATE_EPOCH}
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6480,11 +6427,7 @@
          # and in reverse
          dotest_fail death2-diff-4a \
 "${testcvs} -q diff -rbranch -r1.1 -N -c file1" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -c -N -r1\.1\.2\.1 -r1\.1
+"diff -c -N -r1\.1\.2\.1 -r1\.1
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
 --- file1      ${RFCDATE}      [0-9.]*
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6497,11 +6440,7 @@
 "${SPROG} diff: file1 no longer exists, no comparison available"
 
          dotest_fail death2-diff-6 "${testcvs} -q diff -rtag -N -c ." \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -c -N -r1\.1 file1
+"diff -c -N -r1\.1 file1
 \*\*\* file1   [-a-zA-Z0-9: ]* [0-9.]*
 --- /dev/null  ${RFCDATE_EPOCH}
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6534,12 +6473,9 @@
 "${SPROG} diff: file1 is a new entry, no comparison available"
 
          dotest_fail death2-diff-8 "${testcvs} -q diff -N -c file1" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-diff -c -N file1
+"diff -c -N file1
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
---- file1      ${RFCDATE}
+--- file1$LOCAL_RFCDATE
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
 \*\*\* 0 \*\*\*\*
 --- 1 ----
@@ -6609,11 +6545,7 @@
 "$SPROG diff: tag tag is not in file file3"
 
          dotest_fail death2-diff-10 "${testcvs} -q diff -rtag -N -c file3" \
-"Index: file3
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/Attic/file3,v
-retrieving revision 1\.1\.2\.1
-diff -c -N -r1\.1\.2\.1 file3
+"diff -c -N -r1\.1\.2\.1 file3
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
 --- file3      ${RFCDATE}      [0-9.]*
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6622,12 +6554,7 @@
 ${PLUS} first revision"
 
          dotest_fail death2-diff-11 "${testcvs} -q diff -rtag -c ." \
-"Index: file1
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-retrieving revision 1\.1
-retrieving revision 1\.1\.2\.2
-diff -c -r1\.1 -r1\.1\.2\.2
+"diff -c -r1\.1 -r1\.1\.2\.2
 \*\*\* file1   ${RFCDATE}      [0-9.]*
 --- file1      ${RFCDATE}      [0-9.]*
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6640,12 +6567,7 @@
 ${SPROG} diff: file4 no longer exists, no comparison available"
 
          dotest_fail death2-diff-12 "${testcvs} -q diff -rtag -c -N ." \
-"Index: file1
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-retrieving revision 1\.1
-retrieving revision 1\.1\.2\.2
-diff -c -N -r1\.1 -r1\.1\.2\.2
+"diff -c -N -r1\.1 -r1\.1\.2\.2
 \*\*\* file1   ${RFCDATE}      [0-9.]*
 --- file1      ${RFCDATE}      [0-9.]*
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -6653,10 +6575,6 @@
 ! first revision
 --- 1 ----
 ! second revision
-Index: file2
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
-retrieving revision 1\.1\.2\.2
 diff -c -N -r1\.1\.2\.2 file2
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
 --- file2      ${RFCDATE}      [0-9.]*
@@ -6664,10 +6582,6 @@
 \*\*\* 0 \*\*\*\*
 --- 1 ----
 ${PLUS} branch revision
-Index: file3
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/Attic/file3,v
-retrieving revision 1\.1\.2\.1
 diff -c -N -r1\.1\.2\.1 file3
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
 --- file3      ${RFCDATE}      [0-9.]*
@@ -6675,10 +6589,6 @@
 \*\*\* 0 \*\*\*\*
 --- 1 ----
 ${PLUS} first revision
-Index: file4
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file4,v
-retrieving revision 1\.1
 diff -c -N -r1\.1 file4
 \*\*\* file4   ${RFCDATE}      [0-9.]*
 --- /dev/null  ${RFCDATE_EPOCH}
@@ -6702,11 +6612,7 @@
 ${SPROG} diff: No comparison available\.  Pass .-N. to .${SPROG} 
diff.${QUESTION}"
 
          dotest_fail death2-diff-14 "${testcvs} -q diff -r rdiff-tag -c -N" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -c -N -r1\.1\.2\.1 -r1\.1
+"diff -c -N -r1\.1\.2\.1 -r1\.1
 \*\*\* /dev/null       ${RFCDATE_EPOCH}
 --- file1      ${RFCDATE}      [0-9.]*
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -7550,12 +7456,7 @@
 ============================================================================="
          dotest_fail branches-14.4 \
            "${testcvs} diff -c -r 1.1 -r 1.3 file4" \
-"Index: file4
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
-retrieving revision 1\.1
-retrieving revision 1\.3
-diff -c -r1\.1 -r1\.3
+"diff -c -r1\.1 -r1\.3
 \*\*\* file4   ${RFCDATE}      1\.1
 --- file4      ${RFCDATE}      1\.3
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -7565,12 +7466,7 @@
 ! 4:trunk-3"
          dotest_fail branches-14.5 \
            "${testcvs} diff -c -r 1.1 -r 1.2.2.1 file4" \
-"Index: file4
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file4,v
-retrieving revision 1\.1
-retrieving revision 1\.2\.2\.1
-diff -c -r1\.1 -r1\.2\.2\.1
+"diff -c -r1\.1 -r1\.2\.2\.1
 \*\*\* file4   ${RFCDATE}      1\.1
 --- file4      ${RFCDATE}      1\.2\.2\.1
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -8763,11 +8659,6 @@
 
        dotest_fail rcslib-diff9 "${testcvs} diff -r first -r second" \
 "${SPROG} diff: Diffing \.
-Index: foo\.c
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
-retrieving revision 1\.1
-retrieving revision 1\.2
 diff -r1\.1 -r1\.2
 1c1
 < I am the first foo, and my name is \$""Name: first \$\.
@@ -8777,10 +8668,6 @@
          echo "I am the once and future foo, and my name is $""Name$." > foo.c
          dotest_fail rcslib-diff10 "${testcvs} diff -r first" \
 "${SPROG} diff: Diffing \.
-Index: foo\.c
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/foo\.c,v
-retrieving revision 1\.1
 diff -r1\.1 foo\.c
 1c1
 < I am the first foo, and my name is \$""Name: first \$\.
@@ -8822,13 +8709,9 @@
          # Incidentally test that CVS no longer splits diff arguments on
          # spaces.
          dotest_fail rcslib-diffrgx-3 "$testcvs diff -c -F'.* (' rgx.c" \
-"Index: rgx\.c
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/rgx\.c,v
-retrieving revision 1\.1
-diff -c -F '\.\* (' -r1\.1 rgx\.c
+"diff -c -F '\.\* (' -r1\.1 rgx\.c
 \*\*\* rgx\.c  ${RFCDATE}      1\.1
---- rgx\.c     ${RFCDATE}
+--- rgx\.c$LOCAL_RFCDATE
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* test_regex (whiz, bang)
 \*\*\* 3,7 \*\*\*\*
   foo;
@@ -11042,21 +10925,13 @@
 \`temp\.txt' already contains the differences between 1\.1 and 1\.2
 M temp\.txt"
          dotest_fail join6-3.6 "${testcvs} diff temp.txt" \
-"Index: temp\.txt
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
-retrieving revision 1\.2
-diff -r1\.2 temp.txt
+"diff -r1\.2 temp.txt
 1d0
 < aaa"
 
          cp temp2.txt temp.txt
          dotest_fail join6-4 "${testcvs} diff temp.txt" \
-"Index: temp.txt
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/join6/temp\.txt,v
-retrieving revision 1\.2
-diff -r1\.2 temp\.txt
+"diff -r1\.2 temp\.txt
 4d3
 < ddd"
 
@@ -11072,11 +10947,7 @@
 $CPROG update: conflicts during merge
 C temp\.txt"
          dotest_fail join6-9 "${testcvs} diff temp.txt" \
-"Index: temp\.txt
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
-retrieving revision 1\.2
-diff -r1\.2 temp\.txt
+"diff -r1\.2 temp\.txt
 3a4,6
 > <<<<<<< temp\.txt
 > dddd
@@ -11089,11 +10960,7 @@
 new revision: 1\.3; previous revision: 1\.2"
           cp temp3.txt temp.txt
          dotest_fail join6-11 "${testcvs} diff temp.txt" \
-"Index: temp\.txt
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/join6/temp.txt,v
-retrieving revision 1\.3
-diff -r1\.3 temp\.txt
+"diff -r1\.3 temp\.txt
 3a4
 > ddd"
          dotest join6-12 "$testcvs update -j1.2 -j1.3 temp.txt" \
@@ -23903,13 +23770,9 @@
          echo "add a line to the end" >>file1
 
          dotest_fail big-4b "$testcvs -q diff -u" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1
-diff -u -r1\.1 file1
+"diff -u -r1\.1 file1
 --- file1      $RFCDATE        1\.1
-$PLUS$PLUS$PLUS file1  $RFCDATE
+$PLUS$PLUS$PLUS file1$LOCAL_RFCDATE
 @@ -998,3 ${PLUS}998,4 @@
  This is line (9,9,7) which goes into the file file1 for testing
  This is line (9,9,8) which goes into the file file1 for testing
@@ -25365,11 +25228,7 @@
 C file1"
 
          dotest_fail keyword2-12 "${testcvs} diff file1" \
-"Index: file1
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-retrieving revision 1\.2
-diff -r1\.2 file1
+"diff -r1\.2 file1
 0a1
 > <<<<<<< file1
 1a3,5
@@ -25491,12 +25350,7 @@
          # and diff thinks so too.  Case (a) from the comment in
          # cvs.texinfo (Common options).
          dotest_fail head-trunk-diff "${testcvs} -q diff -c -r HEAD -r br1" \
-"Index: file1
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-retrieving revision 1\.3
-retrieving revision 1\.3\.2\.2
-diff -c -r1\.3 -r1\.3\.2\.2
+"diff -c -r1\.3 -r1\.3\.2\.2
 \*\*\* file1   ${RFCDATE}      1\.3
 --- file1      ${RFCDATE}      1\.3\.2\.2
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -25544,12 +25398,7 @@
          # Like head-brtag-diff, there is a non-branch sticky tag.
          dotest_fail head-trunktag-diff \
            "${testcvs} -q diff -c -r HEAD -r br1" \
-"Index: file1
-===================================================================
-RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-retrieving revision 1\.3
-retrieving revision 1\.3\.2\.2
-diff -c -r1\.3 -r1\.3\.2\.2
+"diff -c -r1\.3 -r1\.3\.2\.2
 \*\*\* file1   ${RFCDATE}      1\.3
 --- file1      ${RFCDATE}      1\.3\.2\.2
 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
@@ -25666,12 +25515,7 @@
          # Test diff -r<tag>:<date> with two revisions specified.
          dotest_fail tagdate-13b \
 "$testcvs -q diff -u -rbr2:'$date_T3' -rbr2:now file1" \
-"Index: file1
-===================================================================
-RCS file: $CVSROOT_DIRNAME/first-dir/file1,v
-retrieving revision 1\.1\.4\.1
-retrieving revision 1\.1\.4\.2
-diff -u -r1\.1\.4\.1 -r1\.1\.4\.2
+"diff -u -r1\.1\.4\.1 -r1\.1\.4\.2
 --- file1      $RFCDATE        1\.1\.4\.1
 +++ file1      $RFCDATE        1\.1\.4\.2
 @@ -1 ${PLUS}1 @@
@@ -29195,54 +29039,30 @@
          dotest_fail multiroot-diff-1 "${testcvs} diff" \
 "${SPROG} diff: Diffing \.
 ${SPROG} diff: Diffing mod1-1
-Index: mod1-1/file1-1
-===================================================================
-RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
-retrieving revision 1\.1
-diff -r1\.1 file1-1
+diff -r1\.1 mod1-1/file1-1
 1a2
 > bobby
 ${SPROG} diff: Diffing mod1-2
-Index: mod1-2/file1-2
-===================================================================
-RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
-retrieving revision 1\.1
-diff -r1\.1 file1-2
+diff -r1\.1 mod1-2/file1-2
 1a2
 > brown
 ${SPROG} diff: Diffing mod2-2/mod1-2
 ${SPROG} diff: Diffing mod1-2/mod2-2
 ${SPROG} diff: Diffing mod2-1
-Index: mod2-1/file2-1
-===================================================================
-RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
-retrieving revision 1\.1
-diff -r1\.1 file2-1
+diff -r1\.1 mod2-1/file2-1
 1a2
 > goes
 ${SPROG} diff: Diffing mod2-2
-Index: mod2-2/file2-2
-===================================================================
-RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
-retrieving revision 1\.1
-diff -r1\.1 file2-2
+diff -r1\.1 mod2-2/file2-2
 1a2
 > down" \
 "${SPROG} diff: Diffing \.
 ${SPROG} diff: Diffing mod1-1
-Index: mod1-1/file1-1
-===================================================================
-RCS file: ${CVSROOT1_DIRNAME}/mod1-1/file1-1,v
-retrieving revision 1\.1
-diff -r1\.1 file1-1
+diff -r1\.1 mod1-1/file1-1
 1a2
 > bobby
 ${SPROG} diff: Diffing mod1-2
-Index: mod1-2/file1-2
-===================================================================
-RCS file: ${CVSROOT1_DIRNAME}/mod1-2/file1-2,v
-retrieving revision 1\.1
-diff -r1\.1 file1-2
+diff -r1\.1 mod1-2/file1-2
 1a2
 > brown
 ${SPROG} diff: Diffing mod2-2
@@ -29250,19 +29070,11 @@
 ${SPROG} diff: Diffing mod1-2
 ${SPROG} diff: Diffing mod1-2/mod2-2
 ${SPROG} diff: Diffing mod2-1
-Index: mod2-1/file2-1
-===================================================================
-RCS file: ${CVSROOT2_DIRNAME}/mod2-1/file2-1,v
-retrieving revision 1\.1
-diff -r1\.1 file2-1
+diff -r1\.1 mod2-1/file2-1
 1a2
 > goes
 ${SPROG} diff: Diffing mod2-2
-Index: mod2-2/file2-2
-===================================================================
-RCS file: ${CVSROOT2_DIRNAME}/mod2-2/file2-2,v
-retrieving revision 1\.1
-diff -r1\.1 file2-2
+diff -r1\.1 mod2-2/file2-2
 1a2
 > down"
 
@@ -30251,22 +30063,12 @@
 T dir1/sdir/ssdir/ssfile"
          dotest_fail multiroot2-12 \
 "${testcvs} -q diff -u -r tag1 -r tag2" \
-"Index: dir1/file1
-===================================================================
-RCS file: ${TESTDIR}/root1/dir1/file1,v
-retrieving revision 1\.1\.1\.1
-retrieving revision 1\.2
-diff -u -r1\.1\.1\.1 -r1\.2
+"diff -u -r1\.1\.1\.1 -r1\.2
 --- dir1/file1 ${RFCDATE}      1\.1\.1\.1
 ${PLUS}${PLUS}${PLUS} dir1/file1       ${RFCDATE}      1\.2
 @@ -1 ${PLUS}1,2 @@
  file1
 ${PLUS}change it
-Index: dir1/sdir/sfile
-===================================================================
-RCS file: ${TESTDIR}/root2/sdir/sfile,v
-retrieving revision 1\.1\.1\.1
-retrieving revision 1\.2
 diff -u -r1\.1\.1\.1 -r1\.2
 --- dir1/sdir/sfile    ${RFCDATE}      1\.1\.1\.1
 ${PLUS}${PLUS}${PLUS} dir1/sdir/sfile  ${RFCDATE}      1\.2
@@ -32176,7 +31978,7 @@
          save_CVS_SERVER=$CVS_SERVER
          ln -s $PRIMARY_CVSROOT_DIRNAME $TESTDIR/primary_link
          dotest writeproxy-0 "$CVS_SERVER server" \
-"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents sign status rdiff tag rtag import admin export history 
release watch-on watch-off watch-add watch-remove watchers editors edit init 
annotate rannotate noop version
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Base-diff Is-modified UseUnchanged 
Unchanged Notify Hostname LocalDir Questionable Argument Argumentx 
Global_option Gzip-stream wrapper-sendme-rcsOptions Set 
${DOTSTAR}expand-modules ci co update diff log rlog list rlist 
global-list-quiet ls add remove update-patches gzip-file-contents sign status 
rdiff tag rtag import admin export history release watch-on watch-off watch-add 
watch-remove watchers editors edit init annotate rannotate noop version
 ok
 ok
 ok" \
@@ -32463,7 +32265,7 @@
          mv $TESTDIR/save-root $PRIMARY_CVSROOT_DIRNAME
 
          dotest writeproxy-noredirect-5 "$CVS_SERVER server" \
-"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents sign status rdiff tag rtag import admin export history 
release watch-on watch-off watch-add watch-remove watchers editors edit init 
annotate rannotate noop version
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Base-diff Is-modified UseUnchanged 
Unchanged Notify Hostname LocalDir Questionable Argument Argumentx 
Global_option Gzip-stream wrapper-sendme-rcsOptions Set 
${DOTSTAR}expand-modules ci co update diff log rlog list rlist 
global-list-quiet ls add remove update-patches gzip-file-contents sign status 
rdiff tag rtag import admin export history release watch-on watch-off watch-add 
watch-remove watchers editors edit init annotate rannotate noop version
 ok
 ok
 ok
@@ -32495,7 +32297,7 @@
          cd firstdir
          echo now you see me >file1
          dotest writeproxy-noredirect-6 "$CVS_SERVER server" \
-"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents sign status rdiff tag rtag import admin export history 
release watch-on watch-off watch-add watch-remove watchers editors edit init 
annotate rannotate noop version
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Base-diff Is-modified UseUnchanged 
Unchanged Notify Hostname LocalDir Questionable Argument Argumentx 
Global_option Gzip-stream wrapper-sendme-rcsOptions Set 
${DOTSTAR}expand-modules ci co update diff log rlog list rlist 
global-list-quiet ls add remove update-patches gzip-file-contents sign status 
rdiff tag rtag import admin export history release watch-on watch-off watch-add 
watch-remove watchers editors edit init annotate rannotate noop version
 ok
 ok
 ok
@@ -32525,7 +32327,7 @@
          echo /file1/0/dummy+timestamp// >>CVS/Entries
 
          dotest writeproxy-noredirect-7 "$CVS_SERVER server" \
-"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Is-modified UseUnchanged Unchanged 
Notify Hostname LocalDir Questionable Argument Argumentx Global_option 
Gzip-stream wrapper-sendme-rcsOptions Set ${DOTSTAR}expand-modules ci co update 
diff log rlog list rlist global-list-quiet ls add remove update-patches 
gzip-file-contents sign status rdiff tag rtag import admin export history 
release watch-on watch-off watch-add watch-remove watchers editors edit init 
annotate rannotate noop version
+"Valid-requests Root Valid-responses valid-requests Command-prep Referrer 
Repository Directory Relative-directory Max-dotdot Static-directory Sticky 
Entry Kopt Checkin-time Modified Signature Base-diff Is-modified UseUnchanged 
Unchanged Notify Hostname LocalDir Questionable Argument Argumentx 
Global_option Gzip-stream wrapper-sendme-rcsOptions Set 
${DOTSTAR}expand-modules ci co update diff log rlog list rlist 
global-list-quiet ls add remove update-patches gzip-file-contents sign status 
rdiff tag rtag import admin export history release watch-on watch-off watch-add 
watch-remove watchers editors edit init annotate rannotate noop version
 ok
 ok
 Mode u=rw,g=rw,o=r
@@ -35275,7 +35077,6 @@
 0a1
 ===================================================================
 > foo
-Index: file1
 RCS file: ${CVSROOT_DIRNAME}/trace/file1,v
 diff -r1\.1 -r1\.2
 retrieving revision 1\.1
Index: ccvs/src/server.c
diff -u ccvs/src/server.c:1.453.2.9 ccvs/src/server.c:1.453.2.10
--- ccvs/src/server.c:1.453.2.9 Mon Jan 16 21:02:06 2006
+++ ccvs/src/server.c   Fri Jan 20 21:29:56 2006
@@ -6108,6 +6108,7 @@
   REQ_LINE("Checkin-time", serve_checkin_time, 0),
   REQ_LINE("Modified", serve_modified, RQ_ESSENTIAL),
   REQ_LINE("Signature", serve_signature, 0),
+  REQ_LINE("Base-diff", serve_noop, 0),
   REQ_LINE("Is-modified", serve_is_modified, 0),
 
   /* The client must send this request to interoperate with CVS 1.5
@@ -8286,20 +8287,23 @@
     if (!supported_response (istemp ? "Temp-checkout" : "Base-checkout"))
        return;
 
-    if (/* Entry rev and new rev are the same...  */
-       prev && !strcmp (prev, rev)
+    if (/* Not sending a temp file...  */
+       !istemp
+       /* ...and entry rev and new rev are the same...  */
+       && prev && !strcmp (prev, rev)
        /* ...and... */
        && (   /* ...both option specs are empty...  */
            (  (!poptions || !poptions[0]) && (!options || !options[0]))
-              /* ...or the option specs match.  */
+              /* ...or the option specs match...  */
            || (poptions && options && !strcmp (poptions, options)))
-       && (   /* ...both option specs are empty...  */
+       /* ...and... */
+       && (   /* ...both tag specs are empty...  */
            (  (!ptag || !ptag[0]) && (!tag || !tag[0]))
-              /* ...or the option specs match.  */
+              /* ...or the tag specs match.  */
            || (ptag && tag && !strcmp (ptag, tag)))
        )
        /* PREV & REV are the same, so the client should already have this
-        * file.
+        * base file.
         */
        return;
 
@@ -8495,6 +8499,39 @@
 
 
 
+void
+server_base_diff (struct file_info *finfo, const char *f1, const char *rev1,
+                 const char *label1, const char *f2, const char *rev2,
+                 const char *label2)
+{
+    if (!supported_response ("Base-diff"))
+       return;
+
+    buf_output0 (protocol, "Base-diff ");
+    output_dir (finfo->update_dir, finfo->repository);
+    buf_output0 (protocol, finfo->file);
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, strcmp (f1, DEVNULL) ? "TEMP" : "DEVNULL");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev1 ? rev1 : "");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, label1 ? label1 : "");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, strcmp (f2, DEVNULL)
+                          ? (rev2 ? "TEMP" : "WORKFILE")
+                          : "DEVNULL");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, rev2 ? rev2 : "");
+    buf_output (protocol, "\n", 1);
+    buf_output0 (protocol, label2 ? label2 : "");
+    buf_output (protocol, "\n", 1);
+    buf_send_counted (protocol);
+
+    return;
+}
+
+
+
 /*
  * void cvs_trace(int level, const char *fmt, ...)
  *
Index: ccvs/src/server.h
diff -u ccvs/src/server.h:1.44.6.4 ccvs/src/server.h:1.44.6.5
--- ccvs/src/server.h:1.44.6.4  Fri Jan 13 05:08:12 2006
+++ ccvs/src/server.h   Fri Jan 20 21:29:56 2006
@@ -248,6 +248,9 @@
 void server_base_merge (struct file_info *finfo, const char *rev1,
                        const char *rev2);
 void server_base_signatures (struct file_info *finfo, const char *rev);
+void server_base_diff (struct file_info *finfo, const char *f1,
+                      const char *rev1, const char *label1, const char *f2,
+                      const char *rev2, const char *label2);
 bool server_use_bases (void);
 
 void cvs_output (const char *, size_t);
Index: ccvs/src/vers_ts.c
diff -u ccvs/src/vers_ts.c:1.65.6.3 ccvs/src/vers_ts.c:1.65.6.4
--- ccvs/src/vers_ts.c:1.65.6.3 Mon Jan 16 21:02:06 2006
+++ ccvs/src/vers_ts.c  Fri Jan 20 21:29:56 2006
@@ -285,7 +285,7 @@
            vers_ts->ts_user = time_stamp (finfo->file);
     }
 
-    return (vers_ts);
+    return vers_ts;
 }
 
 
@@ -332,9 +332,9 @@
        else if (entdata->conflict
                 && entdata->conflict[0] == '=')
        {
-           /* These just need matching content.  Might as well minimize it.  */
-           vers_ts->ts_user = xstrdup ("");
-           vers_ts->ts_conflict = xstrdup ("");
+           /* These need matching content that doesn't match ->ts_rcs.  */
+           vers_ts->ts_user = xstrdup ("Is-modified");
+           vers_ts->ts_conflict = xstrdup ("Is-modified");
        }
        else if (entdata->timestamp
                 && (entdata->timestamp[0] == 'M'




reply via email to

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