While working on the new diff interface I've hit this bug http://jira.xwiki.org/jira/browse/XWIKI-1468 with the numbering on versions in the RCS file which does not correspond to the version of the real documents. There are different ways to fix this, but maybe it's not worth to do the "perfrect fix" with Artem's work on versioning storage that coult not make use of RCS. So the problem is that in the RCS file you have 1.3 -> $doc.version = 1.4 1.2 -> $doc.version = 1.3 1.1 -> $doc.version = 1.2 This actually is visible in the UI when you request the version list of the document that is in version 1.4 you will be shown version 1.3,1.2,1.1 but no 1.4. If you click on 1.3 then you will see document in the latest version. If you make a diff between 1.3 and 1.2 then you will see in the UI "From 1.4 to 1.3". I found that this problem depends on the initial version of the document when it is first saved. This means that we should be able to detect the issue for fixing the view as well as migrate the version file on save when we see the problem. Fix 1: change the UI to acknowledge this mistake (make only changes in vm files) but no fix to saving Fix 2: change $xwiki.getDocument(doc, version) and $doc.getRevisions (and related) to send back the right data but no fix to saving Fix 3: fix the problem in saving (move all versions by one if we detect the problem), detect the issue (last RCS version not equal to current doc version) to apply fix1 and fix2 for the display (probably easier to do with fix 2) I'm more favorable to fix 3 combined with fix 2. WDYT ? Ludovic -- Ludovic Dubost Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost GTalk: ldubost AIM: nvludo Yahoo: ludovic