Priority: Normal
Current State: Proposal Required
Released In: n/a
Target Release: major
Meta::getLoadedRev is documented as returning "undef" if the requested rev is not in the store. However it returns the requested Rev number, while actually returning the data from the prior available rev.
I created a topic with a missing revision: (From rcs
rlog
command)
----------------------------
revision 1.4
date: 2011/02/21 03:05:10; author: BaseUserMapping_333; state: Exp; lines: +1 -1
save topic
----------------------------
revision 1.2
date: 2011/02/21 02:13:36; author: BaseUserMapping_333; state: Exp; lines: +4 -3
reprev
----------------------------
Viewing the topic with
raw=debug;rev=3
shows from the metadata that Revision 2 is actually returned as the topic object. However the RCS chain at the bottom of the window shows r3 as the current version
%-META:TOPICINFO{author="BaseUserMapping_333" comment="save topic" date="1298254416" format="1.1" reprev="2" version="2"}%
...
History: r13 | r4 < =r3= < r2 < r1 |
$topicObject->getLoadedRev() however returns 3 as the topic revision.
From the Meta->load() documentation:
* =$rev= - revision to load. If undef, 0, '' or > max available rev, will
load the latest rev. If the revision is in range but does not exist,
then will return an unloaded meta object (getLoadedRev() will be undef)
In trying to write Topic Restore logic that cleanly restores old preferences, I attempted to detect this condition. However the code silently restores the prior version rather than returning an oops that the requested revision is not available.
--
GeorgeClark - 22 Feb 2011
Defer to 1.1.5 or 1.2.0
--
GeorgeClark - 23 Nov 2011
Defer to 2.0.
--
GeorgeClark - 02 Jun 2014