When a file has been modified in the repository as well as in a
checked out copy, "cvs -nq update" in cvs-1.10 used to report
the file as having 'C' status.  cvs 1.10.5+ tries to do the
merge and reports 'C' if there will be a true conflict and 'M'
otherwise -- but only when the repository is local.  If the
repository is :ext: then it reports 'C' either way.

Two solutions I see are:

        1. Have local and remote always report 'C'

                - This makes life easier for people and scripts
                  that expect 'cvs -nq update' to provide a
                  one-line summary for each interesting file,
                  otherwise scripts have to parse that RCS
                  cruft and remember it when they see the next
                  'M foo' line.  It also makes cvs faster.

                - A patch for this against 1.10.8 is appended.

        2. Have local and remote check for a true conflict and
          report 'M' or 'C' accordingly.

                - This distinction is of dubious value since it
                  only allows the user to know a little sooner
                  that they have to do a merge, and makes
                  correctly parsing 'cvs -nq update' output
                  unneccesarily complicated.

There are other solutions, such as introducing a new letter to
distinguish the conflict and merge cases, or adding a
command-line option for scripts to use, but these would be more
disruptive.

Here is a patch to revert to the 1.10 behavior (solution 1 above):

diff -u -ru -p cvs-1.10.8.orig/src/ChangeLog cvs-1.10.8/src/ChangeLog
--- cvs-1.10.8.orig/src/ChangeLog       Mon Jan 17 10:04:22 2000
+++ cvs-1.10.8/src/ChangeLog    Fri Apr 14 17:27:34 2000
@@ -1,3 +1,11 @@
+2000-04-14  Bart Robinson  <[EMAIL PROTECTED]>
+
+       * update.c (update_fileproc): back out change to distinquish
+       between files that have a conflict and those that just need
+       a merge, when the file has changed in the repository as well
+       as in the local checkout.
+       (merge_file): ditto
+
 2000-01-17  Larry Jones  <[EMAIL PROTECTED]>
 
        * mkmodules.c (init): Create CVSROOT/Emptydir to avoid problems
diff -u -ru -p cvs-1.10.8.orig/src/update.c cvs-1.10.8/src/update.c
--- cvs-1.10.8.orig/src/update.c        Wed Jan  5 08:35:46 2000
+++ cvs-1.10.8/src/update.c     Fri Apr 14 17:19:37 2000
@@ -648,7 +648,15 @@ update_fileproc (callerdat, finfo)
                write_letter (finfo, 'C');
                break;
            case T_NEEDS_MERGE:         /* needs merging */
-               retval = merge_file (finfo, vers);
+               if (noexec)
+               {
+                   retval = 1;
+                   write_letter (finfo, 'C');
+               }
+               else
+               {
+                   retval = merge_file (finfo, vers);
+               }
                break;
            case T_MODIFIED:            /* locally modified */
                retval = 0;
@@ -2054,7 +2062,8 @@ merge_file (finfo, vers)
 
     if (status == 1)
     {
-       error (0, 0, "conflicts found in %s", finfo->fullname);
+       if (!noexec)
+           error (0, 0, "conflicts found in %s", finfo->fullname);
 
        write_letter (finfo, 'C');
 

Reply via email to