bug-cvs
[Top][All Lists]
Advanced

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

Re: "cvs commit: Up-to-date check failed for `file'" is wrong error.


From: Todd Denniston
Subject: Re: "cvs commit: Up-to-date check failed for `file'" is wrong error.
Date: Fri, 15 Jul 2005 17:15:36 -0500

Todd Denniston wrote:
> 
<SNIP>
> The error was
> cvs commit: Up-to-date check failed for `file'
> 
> cvs update was done several times without making the situation better, and
> there were no conflict markers.  After I worked on the problem for several
> minutes I noticed that the commit command he was using looked like
> `cvs commit ../dir1 ../dir2/subdir1/subdir2 file` 
<SNIP> 
It seems now I had the above command wrong it should have been
`cvs commit ../dir1/file1 ../dir2/subdir1/subdir2/file2 file` 
if you instead pass the directory args as just directories the it works. see
demonstration script below.

...
Using the active repository, because I had been unable to recreate it in a
scratch repo, I have traced the problem quit a bit farther.

Also unfortunate is that there is no indication that the message came from
the server, which is where it came from, and that took a while to trace
down.

once on the server I set extra 'error (0, 0,"where ami")` messages until I
found that the status being set was T_CONFLICT, and further traced that back
to 

classify.c:Classify_File

            else if (No_Difference (finfo, vers))
            {
                /* they are different -> conflict */
                if (!really_quiet)
                    error (0, 0,
               "conflict: %s is modified but no longer in the repository",
                           finfo->fullname);
                ret = T_CONFLICT;
            }
            else

having it print finfo->fullname yielded only the file name, with out any
path, 
and having it print finfo->update_dir yielded an empty string, even though
they both are two directories deep within the repository.

I have since come up with a script to demonstrate the pathology using 
cvshome.org cvs-1.11.20:
#script license: GPL V2 or later, or BSD
#Copy as desired.
export PS1=#
export PATH=/tmp/test11.20/bin/:$PATH
rm /tmp/testcvs/ /tmp/mod/ -fr
export CVSROOT=:fork:/tmp/testcvs
mkdir /tmp/testcvs
cvs init
mkdir /tmp/testcvs/mod
cvs checkout mod
cd mod
mkdir mod1 mod2/submod mod3/submod1/submod2 -p
for i in `find /tmp/mod/ -type d |grep -v CVS`; \
do date >$i/f2;done
for i in `find . -type d|grep -v CVS`; \
do cvs add -m "add abunch" $i ;done
for i in `find . -type f|grep -v CVS`; \
do cvs add -m "add abunch" $i ;done
cvs commit -m "add d commit"
for i in `find /tmp/mod/ -type d | \
grep -v CVS`;do date >$i/f2;done
pwd;ls
cd mod1
#
cvs commit -m "this breaks1" ../mod2/f2 \
../mod3/submod1/submod2/f2 f2
#
cvs commit -m "this breaks2" ../mod2/f2 f2
#
cvs commit -m "this breaks3" ../mod2/f2 \
../mod3/submod1/submod2/ f2
#
cvs commit -m "this breaks4" ../mod2/ \
../mod3/submod1/submod2/f2 f2
#
#works if there is no file at the end.
cvs commit -m "this works1" ../mod2/f2 \
../mod3/submod1/submod2/f2 
#
#put more mods in:
(cd ..;for i in `find /tmp/mod/ -type d | \
grep -v CVS`;do date >$i/f2;done)
#
#works if the other entries are directories.
cvs commit -m "this works2" ../mod2/ \
../mod3/submod1/submod2/ f2
cvs --version

-- 
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane) 
Harnessing the Power of Technology for the Warfighter




reply via email to

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