On 7/29/07, Ludovic Dubost <ludovic(a)xwiki.com> wrote:
[snip...]
> 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
[snip...]
> 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 ?
I prefer to allow document versions to start at an arbitrary number
(i.e. if I've imported the document from another wiki, I like to
preserve the version of the document from the original wiki in the
target wiki). This means that the first version of the document may be
1.9, and that's certainly a lot more than one version off...
I don't see a huge issue with revision numbers being different than
version numbers, though it is an issue w/ matching the display..
There is a way to tell RCS to start with a different version: "The
initial version number for a newly registered file is 1.1, by default.
You can specify a different default by setting the variable
vc-default-init-version, or you can give C-x v i a numeric argument;
then it reads the initial version number for this particular file
using the minibuffer." -- seems like including some way to start at an
arbitrary number != 1.1 in the RCS record itself might be the best way
to solve the problem (when the diffs are RCS backed). I haven't
checked out the javadoc, but a cursory investigation of the
constructors seems to imply that JCRS supports this too (passing a
version in w/ the constructor)...
Erin
--
'Waste of a good apple' -Samwise Gamgee