[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cvs sometimes overwrites "in the way" files
From: |
Jacob Burckhardt |
Subject: |
cvs sometimes overwrites "in the way" files |
Date: |
Mon, 4 Jun 2001 18:37:41 -0700 |
Sometimes, when one user runs "cvs add added_file" and "cvs commit",
and another user creates a file with the same filename in parallel, and
then runs "cvs update", then cvs correctly says "move away added_file;
it is in the way". And cvs does *not* overwrite the file created by
the second user.
But if the second user is on a branch *and* he uses the local access
method, then cvs does not give the message "move away added_file; it
is in the way". Also, cvs overwrites the file. The file might have
lots of hours worth of work put into it, and this work is permanently
lost after the update command.
Note that using the fork access method makes cvs correctly give the
message about "move away". Also, using the main trunk makes cvs
correctly give that message. It is only the combination of using a
branch and the local access method in which the bug occurs. The
following table summarizes this:
branch? access? bug?
--------------------------
no_branch fork no_bug
no_branch local no_bug
branch fork no_bug
branch local bug
This happens in cvs-1.11.1p1.
Below is a script which reproduces this bug.
#!/bin/csh -f
if ($2 == "local") then
setenv CVSROOT /tmp/cvs_test/repository
else if ($2 == "fork") then
setenv CVSROOT :fork:/tmp/cvs_test/repository
else
echo "Usage: $0 [branch | no_branch] [local | fork]"
exit 1
endif
########### Set up repository
rm -fr /tmp/cvs_test
mkdir /tmp/cvs_test
cd /tmp/cvs_test
cvs init
mkdir moduletest
cd moduletest
touch controlled_filename
cvs import -m "test log" moduletest vendortest start_release_tag
cd ..
\rm -fr moduletest
#############################
cvs checkout -d 1 moduletest
if ($1 == "branch") then
cvs rtag -b btag moduletest
cvs checkout -r btag -d 2 moduletest
else if ($1 == "no_branch") then
cvs checkout -d 2 moduletest
else
echo "Usage: $0 branch\n $0 no_branch"
exit 1
endif
cd 1
echo 1 > added_file
cvs add added_file
cvs commit -m no_log
echo =================Directory 2:
cd ../2
cvs rtag -r HEAD new moduletest
echo 2 > added_file
echo added_file says:
cat added_file
echo ================Before update -j
cvs update -j new
echo added_file says:
cat added_file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cvs sometimes overwrites "in the way" files,
Jacob Burckhardt <=