[cvsnt] checkout renamed files fails in RC9

Gabriel Genellina gagsl-cvsnt at yahoo.com.ar
Mon Nov 3 16:45:58 GMT 2008


Hello

Checking out specific revisions of a file that has been renamed fails in  
2.5.04.3229 (RC9).
Suppose I have a file old.txt:
rev 1.1 = initial
rev 1.2 = modified, renamed to new.txt
rev 1.3 = current.

Then (using the old name):
cvs co -r 1.1 -p test-rename/old.txt : works
cvs co -r 1.2 -p test-rename/old.txt : fails
cvs co -r 1.3 -p test-rename/old.txt : works

and (using the new name):
cvs co -r 1.1 -p test-rename/new.txt : fails
cvs co -r 1.2 -p test-rename/new.txt : works
cvs co -r 1.3 -p test-rename/new.txt : fails

That is, I can retrieve ANY revision using the OLD name, EXCEPT the exact  
one corresponding to the rename operation, which must be retrieved using  
the NEW name.
I could understand that I should use the new name for that revision AND  
any later revisions, but it's illogical to only require to use the new  
name for that exact revision and not the later ones.
This behavior breaks the TortoiseCVS diff feature, and many history  
related commands.

Using a previous CVSNT version (2.5.03 (Scorpio) Build 2382) one could  
retrieve ANY revision using the OLD name; the NEW name was always invalid.  
At least it was consistent.

Below there is a test script I've used to reproduce the issue. It assumes  
a valid CVSROOT set, and creates a new subdirectory named "test-rename":

<code>
setlocal
set fn=foo
md test-rename
cd test-rename
if exist cvs\. (del /s /q cvs & rd cvs) >nul
if exist %fn%* del %fn%*
cvs import -I *.* -m "" test-rename vtag rtag
cvs co -d . test-rename
echo "test1" > %fn%old
cvs add %fn%old
cvs commit -m "Initial contents" %fn%old
echo "test2" >> %fn%old
cvs commit -m "modif 1.2" %fn%old
cvs rename %fn%old %fn%new
cvs commit -m "renamed %fn%old %fn%new"
echo "test3" >> %fn%new
cvs commit -m "modif 1.3" %fn%new
echo "test4" >> %fn%new
cvs commit -m "modif 1.4" %fn%new
cvs co -r 1.1 -p test-rename/%fn%old
cvs co -r 1.2 -p test-rename/%fn%old
cvs co -r 1.3 -p test-rename/%fn%old
cvs co -r 1.1 -p test-rename/%fn%new
cvs co -r 1.2 -p test-rename/%fn%new
cvs co -r 1.3 -p test-rename/%fn%new
cvs status %fn%old
cvs log %fn%old
cvs status %fn%new
cvs log %fn%new
</code>

-- 
Gabriel Genellina



More information about the cvsnt mailing list