Question
I recently upgraded to 4.0.3 from Cairo and have been having a few problems with attachments. I have a few files that have 3 or more previous revisions and when they are updated now the 'Version history' under
twiki/bin/attach/Main/Page?filename=filename.ext&revInfo=1
(access through Attach>manage) does not reflect the new revision. However under 'Other attachments' where this file is listed it has the details (date, author,comment) of the most recent revision. Also, the embedded link in the page for the use of this attachment, twiki/pub/Main/Page/filename.ext, will bring up the most recent revision.
I've had no issues so far with adding new attachments to topics so I'm not sure where to go with this. Suggestions would be much appreceiated. Thanks.
Environment
--
JohnnyWilson - 02 Aug 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
We have an upgrade to 4.0.4 from Cairo doing the same thing. The
filename,v file for the attachment does not have any information filled in to it. Anybody figured this one out yet?
--
DarylGordon - 16 Aug 2006
This is likely an
RCS file lock issue. You need to unlock the
RCS file on upgrade to TWiki 4. See
TWikiUpgradeGuide.
--
PeterThoeny - 16 Aug 2006
The issue occurs for newly created attachments, not just existing ones. Would it be fair to assume that
RCS file locking would have no effect on new attachments?
That aside, I tried the unlock command anyway, but '-r' is not a supported argument and I cannot find any man pages (for any system) that says -r is valid. So I tried the command without the -r and all it said was it could not unlock an empty tree.
--
DarylGordon - 16 Aug 2006
As a bit of extra info, creating a brand new attachment for a topic causes the attachment to be correctly uploaded and made availiable on the topic. The ,v file is also created but only contains:
head ;
access;
symbols;
locks; strict;
comment @# @;
expand @o@;
desc
@none
@
New topics can be created and have their ,v files correctly filled in - all working fine for topics.
The rcs commands from the configure page can be run on the command line successfully - everything works. So it seems like TWiki isn't running the commands as they have been set up in the configure page.
--
DarylGordon - 16 Aug 2006
I get a mix of those reported above. The '-r' option for rcs is not a supported arguement on my system, checked the man pages etc as well. But at the same time new files that I have been able to create new attachments that seem to behave normally through a few revisions.
--
JohnnyWilson - 16 Aug 2006
The problem is with the
RCS ciCmd. Changed it from
ci -q -l -m'%COMMENT%' -t-none -w'%USERNAME%' %FILENAME%
to
ci -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%
and everything appeared to be working. I got the second command off a cleanly installed 4.0.2 TWiki on my home server. After a bit of playing it turns out that the -l and -u are the problem. If I remove either one of them from the original command string, attachment versioning works. Don't know enough about
RCS to fully understand this yet, but I'll keep digging.
--
DarylGordon - 16 Aug 2006
RCS ciCmd is now
ci -q -m%COMMENT|U% -t-none -w%USERNAME|S% -u %FILENAME|F%
and
RCS ciDateCmd is now
ci -q -m%COMMENT|U% -t-none -d%DATE|D% -w%USERNAME|S% -u %FILENAME|F%
and all seems to be working.
Seems twiki3 and twiki4 use the
RCS commands a bit differently and also use them differently for Topics vs Attachments. Strange, but since I'm not a programmer I'll sit back and be happy that it's all working.
Hope this helps fix your install Johnny.
--
DarylGordon - 16 Aug 2006
Daryl thanks, other than the leading '-q' flags those are the commands my TWiki.cfg uses. What I did find however was:
$cfg{RCS}{ciDateCmd} =
"$cfg{RCS}{BinDir}/ci $cfg{RCS}{ExtOption} -m%COMMENT|U% -t-none -d%DATE|D% -u -w%USERNAME|S% %FILENAME|F%",
With the trailing comma as opposed to a semi-colon. As far as I'm concerned it came out of the install archive that way as I haven't touched that part of the cfg. Nothing is stored in the
ExtOption variable either. Still no luck though, I'm not too sure what else could be going on. Any recommendations would be appreciated. Thanks again.
--
JohnnyWilson - 18 Aug 2006
Not really an answer to your question but: The trailing comma is a bug! Replace this with a semicolon. Otherwise do not touch
TWiki.cfg, use the
configure script to customize the settings, or edit
LocalSite.cfg directly.
--
PeterThoeny - 18 Aug 2006
Peter and Daryl, thanks much for the help. The solution provided by Daryl did fix my problem, I had just goofed up the line in
LocalSite.cfg and not gone back to look at it. I'm glad at least finding a small bug came out of it. Thanks again!
--
JohnnyWilson - 21 Aug 2006