I was looking through http://twiki.org/cgi-bin/view/Codev/DakarReleaseNotes
for a summary of what might have changed with TWiki's RCS locks.
I moved a web from an old Cairo install held in unix user 'usera'
to a new Dakar install held in unix user 'userb'
Doing so caused TWiki to barf on save (can't get lock) and because the save failed and I was using kupu, I lost my changes.
New topic created using the Dakar install work fine, its the old one that fail. I think that the topics need relocking or maybe just unlocking. I'm not sure which.
it was suggested the admin use the ghastly manual procedure.
would help - it seems to apply to the whole wiki though, not just the current web.
It would be better if any unlock/relock is done on the fly, like upgrade category tables
The only way this can happen (I think) is if the user who has the files locked in the old web is not the user who is running apache in the Dakar install. You don't give the complete error message so I can't tell for sure.
Yep, i just checked;
- Created a topic in a shared web using Cairo
- Edited and saved it using Dakar code (same apache server, therefore same user)
and it worked fine. Suggest you document this in a topic on TWiki.org.
Thanks for looking at this - the one thing that is different to your diagnostic set up is that my unix user changed during the process - it was
and is now
I've deleted some of my points that were irrelevant.
I tried breaking the .txt file lock with
- it seems to work now for me, not yet sure whether there are other ramifications.
Editing and saving seems to not RCS relock the files - I assume this means Dakar does not leave the files locked? If so that would be a change.
The error message was:
During save of WebName.AdslModem an error was found by the version control system. Please notify your TWiki administrator.
=Failed to get a lock, RCS: /usr/bin/rcs -q -l %FILENAME|F% failed: =
Go back in your browser and save your changes locally.
The following is how I bulk unlocked a folder:
yes | rcs -I -u -M *,v
As I say, it seems Dakar no longer locks but it does require that the topic not be locked. Does anyone think that it would not be preferable that requirement disappears?
Locks are used by RCS to make file operations atomic. If a topic is locked by someone else, then it would be extremely bad practice to simply break that lock! The lock is a clear indicator that something is worng, and should not be ignored.
Also, it's a very rare case. I can't see a benefit to adding code to break RCS locks.
Not sure we want to break the locks like I did. Maybe we ought bulk unstrict the files?
were the references I was looking for. Cairo keeps the files locked - Dakar does not. If you move the files between Cairo & Dakar then Dakar barfs when it sees the RCS files locked. At minimum we ought document this.
Please feel free to document it on twiki.org
. I don't think doc is needed in the release.
Thanks very much to Colas and Crawford for your help.