bug-cvs
[Top][All Lists]
Advanced

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

[BUG] two update -j -j 's leave a file in the Attic


From: Eli Carter
Subject: [BUG] two update -j -j 's leave a file in the Attic
Date: Wed, 31 Oct 2001 11:58:33 -0600

All,

I've seen bug reports similar to this, but I am able to reproduce this
problem on cvs 1.11 and 1.10.  I could not find anything about this
problem in the 'issue report' section of cvshome.org.

It appears that
cvs update -j1.2 -j1.1 file
cvs update -j1.1 -j1.1.2.1 file
Is not the same as
cvs update -j1.2 -j1.1.2.1 file
when revision 1.2 is a dead file and you commit the result of the above
merge(s) to create revision 1.3.
The first approach leaves an 'Exp' file in the Attic, but the second
does not.

Attached is a script that demonstrates the bug.  Note the 'if true' can
be changed to 'if false' to show that the second version works.

Please CC me as I am not on the list.  If there is a better place to
send this bug report, please point me in the right direction.

Questions, comments, etc.?

Hmmm.. ok, I can reproduce this without involving a branch... I'll
follow up with that test case.

TIA,

Eli 
--------------------.     Real Users find the one combination of bizarre
Eli Carter           \ input values that shuts down the system for days.
eli.carter(a)inet.com `-------------------------------------------------
#!/bin/sh


# This script demonstrates a bug in CVS

#   1.1 ----->  1.1.2.1
#    |             |
# remove          /
#    |           /
#    V          /
#   1.2        /
#    |        /
#    |       /
#    |      /
#    V <---'
#   1.3   File is still in Attic and should not be.

CVSROOT=`pwd`/testroot

thefile=somefilename

cvs init
mkdir project
cd project
cvs import -m 'initial checking of project, empty' project vendortag releasetag
cd ..
cvs checkout project
cd project

# add $thefile to the project
echo "initial content" > $thefile
cvs add $thefile
cvs commit -m 'version 1' $thefile
cvs tag version1 $thefile
# and create a development branch
cvs tag -b devel1 $thefile

# remove $the file from the project
rm $thefile
cvs remove $thefile
cvs commit -m 'remove the first version' $thefile

# now work on the development branch
cvs update -r devel1 $thefile
echo "and we do some work and change the file" >> $thefile
cvs commit -m 'development work' $thefile

# now merge the changes into the mainline
cvs update -A $thefile
if true
then
    # this leaves an 'Exp' file in the Attic,
    cvs update -j1.2 -jversion1 $thefile #revert the cvs remove
    cvs update -jversion1 -jdevel1 $thefile
else
    # but this does not.
    cvs update -j1.2 -jdevel1 $thefile
fi
cvs commit -m 'merge the devel1 branch and revert the mainline remove' $thefile

# $thefile now has the Exp state and is in the Attic.  It will not be found
# by the checkout command.





reply via email to

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