The patch posted yesterday to disable keyword expansion during branch
merges was (1) premature (2) not well tested and (3) based on a very
incomplete understanding of the cvs source code.  I've since spent more
time on the code, and the attached patch does seem to behave properly in
all the cases I've tested.

Note that in update.c, there was code #if-ed out which said in effect

  if (options[0] == '\0') options = "-kk";

If enabled, this was incorrect (presumably why it was disabled), since
it set this before the determination of whether a copy or merge was
needed. 

The attached patch defers that default behavior until it is known that a
merge (rather than a copy) is being done, and is done only during a join
(-j option) operation.

I am interested to know any comments or criticisms people might have of
this patch.   (It's against 1.10.7, but applies fine to 1.10.8).

jay
--- /usr/src/contrib/cvs/src/update.c   Mon Dec 13 15:57:15 1999
+++ /tmp/update.c       Tue Apr 18 10:35:40 2000
@@ -2463,9 +2463,15 @@
        error (0, 0, "file from working directory is now in %s", backup);
        write_letter (finfo, 'C');
     }
-    else
+    else {
+#if 1
+       if (*options == '\0')
+               options = "-kk";        /* to ignore keyword expansions */
+#endif
+
        status = RCS_merge (finfo->rcs, vers->srcfile->path, finfo->file,
                            options, rev1, rev2);
+    }
 
     if (status != 0 && status != 1)
     {

Reply via email to