bug-cvs
[Top][All Lists]
Advanced

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

(no subject)


From: David Holland
Subject: (no subject)
Date: Wed, 30 Jan 2002 17:07:44 -0500 (EST)

>Submitter-Id:   net
>Originator:     David A. Holland
>Organization:
net
>Confidential:  no
>Synopsis:      erroneous handling of deleted vendor-branch files
>Severity:      non-critical
>Priority:      low
>Category:      cvs
>Class:         sw-bug
>Release:       cvs-1.10
>Environment:

System: NetBSD alicante 1.5W NetBSD 1.5W (ALICANTE) #1: Fri Jun 15 12:37:48 EDT 
2001 dholland@alicante:/usr/src/sys/arch/i386/compile/ALICANTE i386

>Description:

        CVS does not appear to handle files that are deleted on the
        vendor branch properly.

        This becomes evident when using cvs diff -N.

>How-To-Repeat:

        Create a repository.
        Import a file, let's say foo.txt. Contents unimportant.
        Check out a working copy.
        Delete foo.txt from the vendor branch:
           - check out a temporary tree with -rvendor-branch
           - rm foo.txt; cvs rm foo.txt; cvs commit foo.txt
           - cvs release this tree
        Go back to the working copy.
        cvs update.
        foo.txt will correctly disappear.
        Now do cvs diff -Nu -rvendor-branch.

        The resulting diff is incorrect:
          - Since foo.txt was never modified on the main branch, it is
            deleted on both the main branch and the vendor branch. The
            update reflects this fact; after the update, the file is
            deleted in the working directory.
          - The working directory is up to date with respect to the main
            branch.
          - Therefore the diff between the working directory and the
            vendor branch should be empty.

        However, it is not - instead, the diff that one gets is from
        the last existing version of foo.txt to /dev/null.

        One may also observe that "cvs diff -Nu" prints nothing,
        "cvs diff -Nu -rHEAD" produces the same inappropriate diff,
        and "cvs diff -Nu -rvendor-branch -rHEAD" prints nothing.


        I am not sure if the same behavior occurs if the file has been
        modified on the main branch before being deleted from both
        branches.


        (It would also be nice if there were a way to automatically
        track deletes at import time, but that's (1) hard and (2) a
        separate issue.)

>Fix:
        I have no idea.

        One can generate correct diffs in the simple cases by diffing
        explicitly against HEAD, but there are times when that's not
        correct.




reply via email to

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