Item12472: $loadedRev undefined in VC::Store for RcsLite
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
When running change_store in
PlainFileStore as below:
perl -I /home/foswiki/master/core/lib -I /home/foswiki/master/core/lib/CPAN/lib ../tools/change_store.pl -w Main -w System -w TestCases -t pf RcsLite PlainFile
I keep seeing the following:
... copy WysiwygPlugin:1
Use of uninitialized value $loadedRev in string eq at /home/foswiki/master/core/lib/Foswiki/Store/VC/Store.pm line 334.
... copy attachment wikiringlogo20x20.png rev 1 as BaseUserMapping_999
Note that the error always appears before
... copy attachment
While it's easy to hack VC::Store to cope with the undef $loadedRev that's not the heart of the matter, this needs investigating.
--
JulianLevens - 12 Apr 2013
Problem was that the caller was using the Store interface directly, and that interface was not setting all the fields on the meta object (specifically, loadedRev and latestIsLoaded). Without correct settings for these fields the meta object was being left in a bad state. So I moved the responsibility for setting the fields down into the store (adding a private-ish API to Meta in the process).
--
CrawfordCurrie - 12 Apr 2013