[Top][All Lists]

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

wrong filename add causes unrecoverable working dir damage

From: Jacob Burckhardt
Subject: wrong filename add causes unrecoverable working dir damage
Date: Fri, 14 Sep 2001 10:19:12 -0700

If I run "cvs add" on a pathname which does not exist, then my working
directory is permanently damaged.  If the user makes a typo or other error
in the pathname to the add command, then cvs should simply tell the user
that the file does not exist and cvs should then recover gracefully.
I.e., cvs should be robust enough to handle this user error.

This problem only happens if I use at least two pathnames on the
command line.  If one pathname is correct, but the other pathname is
wrong, then the bug will occur.  After the bad add command, an update
command will say that the *correct* pathname does not exist in the
repository.  Instead of update complaining about the wrong pathname, it
complains about the correct directory name.  Here are the commands:

cvs add correct_dir wrong_dir/wrong_file
cvs update

The update command above will say:

cvs server: Updating .
cvs server: Updating correct_dir
cvs server: cannot open directory 
/tmp/cvs_test/repository/moduletest/correct_dir: No such file or directory
cvs server: skipping directory correct_dir

Since it said that correct_dir is not in the repository, I thought it
might help to run "cvs add correct_dir", but that made it say "there
is a version in correct_dir already".  I can't think of any other cvs
command that might fix the working directory.

This happens with cvs-1.11.1p1.

The script below can reproduce this bug:

#!/bin/csh -f

setenv CVSROOT :fork:/tmp/cvs_test/repository
rm -fr /tmp/cvs_test
mkdir /tmp/cvs_test
cd /tmp/cvs_test
cvs init
mkdir moduletest
cd moduletest
cvs import -m "test log" moduletest vendortest start_release_tag
cd ..
\rm -fr moduletest

cvs checkout moduletest
cd moduletest
mkdir correct_dir
echo ========== add:; cvs add correct_dir wrong_dir/wrong_file
echo ========== update:; cvs update
echo ========== second add:; cvs add correct_dir

reply via email to

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