bugConcurrent Versions System - Bugs: bug #17565, update -A removes conflict


bug #17565: update -A removes conflict

Submitted by:  None
Submitted on:  Tue 29 Aug 2006 01:29:57 PM UTC  
Votes:  31  
Category: Bug Fix (patch attached)Severity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Derek Robert Price <dprice>
Open/Closed: ClosedRelease: 1.11.23
Fixed Release: 1.11.24Fixed Feature Release: 1.12.14

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 12 Sep 2008 03:49:22 PM UTC, comment #4:

Verified and applied attached patch. Closing.

Derek Robert Price <dprice>
Project AdministratorIn charge of this item.
Fri 09 May 2008 03:07:26 PM UTC, comment #3:

Applied conflict.patch and it passed 'make check'.

(file #15643)

Eugen Zglimbea <eugenzglimbea>
Thu 21 Sep 2006 11:40:34 AM UTC, comment #2:

Sorry for posting as anonymous and thanks for your comment. I'm new to Savannah, not to CVS. I first emailed to -unavailable- without any reaction.
I'm not using cvsnt. -kx stands for the different substitutions modes -kk, -kkv, -kb, -ko, etc. (Ok not very clever but I didn't know -kx is used in cvsnt) Oh, and I used a wrong terminology, I meant sticky '-k' options when writing about sticky tags.

I used before Version 1.11.13 where cvs update -A leaves files with conflicts as they are.
In the manual
the description for update -A is
"Reset any sticky tags, dates, or `-k' options. Does not reset sticky `-k' options on modified files. See Sticky tags, for more information on sticky tags/dates."
So I still think it's a bug.

Susanne Bertling <susbert>
Fri 01 Sep 2006 06:14:32 AM UTC, comment #1:

The reference to cvs update -kx makes me think that perhaps this user is really using CVSNT/TortoiseCVS/WinCVS. Savannah CVS does not have a -kx switch:

If so you should contact the CVSNT newsgroup.

Also I think that "cvs update -A" has never paid attention to conflicts in the file, if the file had a sticky tag, it's cleared and updated to the new version. If you are new to CVS I suggest you ask questions on the newsgroup - not simply post bugs.

Finally - using a real username/email address will make it easier for people to contact you to help you.

Arthur Barrett <arthurba>
Project Member
Tue 29 Aug 2006 01:29:57 PM UTC, original submission:

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)
- 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



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #15643:  conflict.patch added by eugenzglimbea (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by dprice (Posted a comment)
  • -unavailable- added by eugenzglimbea (Updated the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 31 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Sep 2008 03:49:22 PM UTCdpriceStatusNone=>Fixed
      Assigned toNone=>dprice
      Fixed ReleaseNone=>1.11.24
      Fixed Feature ReleaseNone=>1.12.14
    Fri 09 May 2008 03:07:26 PM UTCeugenzglimbeaAttached File-=>Added conflict.patch, #15643
    Thu 21 Sep 2006 11:40:34 AM UTCsusbertCarbon-Copy-=>Added susbert
    Thu 31 Aug 2006 04:43:53 AM UTCpetoftCarbon-Copy-=>Added petoft

    Back to the top

    Powered by Savane 3.1-cleanup1