bug-cvs
[Top][All Lists]
Advanced

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

server commits when some files are not up to date


From: Jacob Burckhardt
Subject: server commits when some files are not up to date
Date: Thu, 21 Dec 2000 14:14:48 -0800 (PST)

The cvs manual says:
>    `commit' verifies that the selected files are up to date with the
> current revisions in the source repository; it will notify you, and
> exit without committing, if any of the specified files must be made
> current first with `update'

In server mode cvs committed a file which was up to date even though
another file was not up to date.  That seems to contradict the above
manual section since it says it will exit without committing.  I
interpret that to mean that it exits without committing *anything*.
I.e. even if *some* of the files were up to date, it won't commit even
those up to date files.  I would like it to work that way, because if
it committed some files which were up to date, those files might need
the recent changes in the files that were not up to date.  If my
colleague then updated his working directory he would get only some of
what I hoped to commit.  That might cause him to get a compiler
error.  So it is better for cvs to either commit everything or commit
nothing.  But in server mode, this does not happen.  But it works
correctly in local mode.

This happens with cvs 1.11

The script below demonstrates this bug.  Run the script with a command
line argument of local and then at the end you will see that the cvs
log command shows no new versions for the up to date file b.  But run
it with the ext argument and then the cvs log command does show that a
new version was committed to the up to date file b.  It should not have
committed since file a was not up to date.  That file was not
up to date since it was removed.

#!/bin/csh -f

if ($1 == "local") then
    echo using local
    setenv CVSROOT /tmp/cvs_test/repository
else if ($1 == "ext") then
    echo using ext mode
    setenv CVSROOT :ext:$USER@localhost:/tmp/cvs_test/repository
else
    echo "Usage: $0 local\n       $0 ext"
    exit 1
endif

set path = ( ~/cvs-1.11/src $path )
set SRC_DIR = `pwd`
cvs --version
rm -fr /tmp/cvs_test
mkdir /tmp/cvs_test
cd /tmp/cvs_test
cvs init
mkdir moduletest
cd moduletest
touch a b
cvs import -m "test log" moduletest vendortest start_release_tag
cd ..
\rm -fr moduletest

cvs checkout moduletest
cd moduletest
echo j >> b
rm a

if {(( cvs ci -mnolog ) > stdout)} >& stderr then
    echo success
else
    echo failed
endif

echo stdout=
cat stdout
echo stderr=
cat stderr
echo end stderr

cvs log b





reply via email to

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