bug-cvs
[Top][All Lists]
Advanced

[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:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6

URL:
  <http://savannah.nongnu.org/bugs/?17565>

                 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
                 Release: 
           Fixed Release: None
   Fixed Feature Release: None

    _______________________________________________________

Details:

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

cvs update -kk -j 1.1.2.1 -j 1.1.2.1.2.1 file1
U file1
RCS file: /cvsroot/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

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;
                else
                {
                    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 1.1.2.1 -j 1.1.2.1.2.1 file1" \
+           "U file1
+RCS file: ${CVSROOT_DIRNAME}/first-dir/file1,v
-           "${testcvs} update -j 1.1.2.1 -j 1.1.2.1.2.1 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
 1:ancest
 [=]======

And in check.log:

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








    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?17565>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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