I have been spammed again.
This time the spammer has spammed some topics that were from Cairo and have been converted to 1.1 style and version 1.2 as a spammer added his crap.
When I want to remove it with edit and cmd=delRev I get this error message
Error saving topic
During save of Application an error was found by the version control system. Please notify your TWiki administrator.
Cannot delete initial revision of WebHome
Go back in your browser and save your changes locally
What is also special is that I do not have any initial ,v files to most of the topics!!! They were deleted when I created the Application zip.
This is the Apache error log
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] ********************************, referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] Cannot delete initial revision of Application.WebHome at /usr/local/apache2/twiki/lib/TWiki/Store.pm line 1088., referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] , referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] ********************************, referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] ********************************, referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] OopsException(attention/save_error web=>Application topic=>WebHome params=>Cannot delete initial revision of Application.WebHome), referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
[Sun Mar 12 13:45:53 2006] [error] [client 192.168.1.9] ********************************, referer: http://www.lavrsen.dk/twiki/bin/edit/Application/WebHome?cmd=delRev
KJL
I have been playing a bit more and I would day that TWiki 4 is handling the RCS file pretty badly compared to Cairo.
If you have a topic without a ,v file Cairo always recovered perfectly by resetting the version number in the topic meta data. Now it saves a version 2 in the topic and a version 1.1 in the ,v file.
A topic created by TWiki has rev 1 = rcs 1.1, rev 2 = rcs 1.2 etc.
This is what goofs up the revision control system.
KJL
Why the f***ing hell we have to store the rev number twice has always been a bit opaque to me. I'd love to build a testcase for this, but without my linux platform I can't run the tests....
CC
The code is meant to create the missing ,v but it seems something is going wrong. Agreed at
http://twiki.org/cgi-bin/view/Codev/EdinburghReleaseMeeting2006x03x13 to drop to "minor"
CC
The code is meant to create the missing ,v? I can't find that.
I guess it
should do that in
RcsWrap.pm
,
numRevisions
: If it finds the file, but no
,v
, it should do an initial checkin before returning '1' as the version number. As another guess I'd say that it stores the rev number in the topic data to allow displaying the revision without having to shell-out RCS - and RCS stores it anyway and wouldn't allow checkin to override an existing version. Can't test before the weekend, though...
TWiki:Main.HaraldJoerg
I have added several new unit tests to try and cover the bases on this. kenneth, please try and reproduce the problem, and re-open this if you can. Thanks.
CC
I have tested. I have both tested using an old Cairo topic without a ,v file and I have tested with a new Dakar topic where the ,v file is removed.
It works much better now. I can now delRev. And when you edit a topic the forst time and save the ,v file is added correctly and the revision 2 is added.
This means that we can safely distribute plugins with data files without ,v files if we want to.
The only small thing left is: If you have a rev 8 and delete the ,v file the version is still shown as rev 8 with links to 7,6,5,4,... And when you edit and save you have a rev 2 which is correct but the previous version presents itself as rev 8. The perfect way would be to always show rev 1 if the ,v file is missing and save a rev 1 in the ,v file when rev 2 is created. But I see the problem connected with doing that. Both in implementation and performance (having to check for the ,v file). I think we can live well with the current implementation.
Thanks for the fix.
KJL