[Top][All Lists]

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

[bug #17565] update -A removes conflict

From: anonymous
Subject: [bug #17565] update -A removes conflict
Date: Tue, 29 Aug 2006 13:29:57 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20060728 Firefox/


                 Summary: update -A removes conflict
                 Project: Concurrent Versions System
            Submitted by: None
            Submitted on: Dienstag 29.08.2006 um 13:29 UTC
                Category: Bug Fix (patch attached)
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
           Fixed Release: None
   Fixed Feature Release: None



CVS 1.11.22:
Different sticky tags causes a file to be updated regardless of conflict:

cvs update -kk -j -j file1
U file1
RCS file: /cvsroot/first-dir/file1,v
retrieving revision
retrieving revision
Merging differences between and into file1
rcsmerge: warning: conflicts during merge

cvs update -A file1
U file1

and the conflict is gone!

Also only using cvs update -kx causes a file to be updated regardless of a
conflict if there is no or a different sticky tag set.

I think the problem is in the Classify_File function where first the
different options are checked and the status T_CONFLICT is only returned when
the options haven't changed. In the following patch I just changed the order
of the checks giving the conflict a higher priority.

diff -u ../../cvs-1.11.22-orig/src/classify.c classify.c
--- ../../cvs-1.11.22-orig/src/classify.c  Thu Sep 22 16:05:49 2005
+++ classify.c  Thu Aug 24 11:44:01 2006
@@ -297,11 +297,11 @@
                /* TODO: decide whether we need to check file permissions
                   for a mismatch, and return T_CONFLICT if so. */
-               if (vers->entdata->options &&
+               if (vers->ts_conflict)
+                   ret = T_CONFLICT;
+               else if (vers->entdata->options &&
                    strcmp (vers->entdata->options, vers->options) != 0)
                    ret = T_CHECKOUT;
-               else if (vers->ts_conflict)
-                   ret = T_CONFLICT;
                    sticky_ck (finfo, aflag, vers);

The corresponding testcase for sanity.sh:

--- ../../cvs-1.11.22-orig/src/sanity.sh   Fri Jun  9 04:09:41 2006
+++ sanity.sh   Thu Aug 24 10:34:37 2006
@@ -6793,14 +6793,12 @@
 --- 1 ----
 ! 4:br1"
          dotest branches-15 \
+           "${testcvs} update -kk -j -j file1" \
+           "U file1
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-           "${testcvs} update -j -j file1" \
-           "RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
 retrieving revision 1\.1\.2\.1
 retrieving revision 1\.1\.2\.1\.2\.1
 Merging differences between 1\.1\.2\.1 and 1\.1\.2\.1\.2\.1 into file1
 rcsmerge: warning: conflicts during merge"
+          dotest_fail branches-15a "${testcvs} update -A file1" "C file1"
          dotest branches-16 "cat file1" '<<<<<<< file1

And in check.log:

PASS: branches-15
U file1
exit status was 0
FAIL: branches-15a


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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