VersioningFileProvider is a new [PageProvider], meant to replace the [RCSFileProvider], which has problems especially with Windows.

It is available from JSPWiki 1.7.0 onwards.  To use it, edit the jspwiki.properties file as follows:

#Change the {{jspwiki.pageProvider}} to {{VersioningFileProvider}} ''with no leading or trailing spaces!!''
#Confirm the line {{jspwiki.fileSystemProvider.pageDir = ''some path''}} is correct for your system
#Add a line {{jspwiki.versioningFileProvider.pageDir = ''some other path''}} to the file, although it doesn't seem to be used for anything...

see also [FileProviderComparing], [FileProviderMoving]


----

Is the VersioningFileProvider now workable on Windows?

How do I go about using it / testing it?

--[MattMower]

It should be quite functional.  Just do the following:
# Open jspwiki.properties file in your favorite editor
# change the jspwiki.pageProvider property to VersioningFileProvider (the former version of this page called for "com.ecyrd.jspwiki.VersioningFileProvider").  
# a few lines below you have to set the directory where the VersioningFileProvider stores its files. Just change the property jspwiki.fileSystemProvider.pageDir according to the file and directory naming conventions...
--[GernotStarke]

Now you should be set (at least for version 2.0.0 alpha).

--[JanneJalkanen]

----

I seem to remember a Java port of the CVS client, I wonder if that had a diff client that could be re-used...

--[MattMower]

Since 1.8.0, we are using an internal Java diff routine, so we now require no other software =).

--[JanneJalkanen]

----

!Setting a maximum number of versions to store?

Something that might be useful would be a property that can be set expressing the maximum number of revisions stored. If this value were set to 10, then when the 11th version were added it could automatically delete the first. I suppose the rest of the files could be then renamed (2 to 1, 3, to 2, etc) but I'm not sure I see much need for that. That might reduce some of the administration necessary. I don't see a whole lot of interest with maintaining the ability to go back to the absolute first version of something. I find that being able to back a few to maybe a dozen is sufficient, but YMMV, I suppose.

-- RobSeegel

Nice idea.  It would make sense to enable something like that for intranet wikis and so on; on public wikis you really want rollback to any version (to make sure you can get over from WikiGraffiti).

-- JanneJalkanen

Is this available (vJSPWiki v2.2.13) ?

Right now I have pages with more than 150 revisions !

-- RealGagnon



----

When I try to use VersioningFileProvider on my wiki, the system gave me 

!an error that An unknown exception java.lang.~NullPointerException was caught by Error.jsp

Who has idea why it is?

-- Dongsehng
----
Hi ... even i am having the same problems with it 

An unknown exception java.lang.~NullPointerException was caught by Error.jsp

does anybody know whats happening?? 

Thanks

----
Check and make sure that it's not a permissions problem.   Can the web server (tomcat?) create files in the directory specified as the pageDir.
----

Arite ... the null pointer exception is now solved... u need to do the following:

1.  jspwiki.pageProvider = VersioningFileProvider

2. jspwiki.fileSystemProvider.pageDir = path where all the wiki pages are... it creates a subdirectory here for storing the older versions...

3. jspwiki.versioningFileProvider.pageDir = some path

and it works fine for me ...

But can someone tell me if you have managed to get the [AntCvsFileProvider] running fine with the latest version of JSPwiki??
thanks

AJ
----
This is also needed (at least in 2.3.92):

4. jspwiki.usePageCache = true

TN
----
I found that if there is a space at the end of "jspwiki.pageProvider = VersioningFileProvider
" then you get the exception "An unknown exception java.lang.~NullPointerException was caught by Error.jsp".  Make sure there are no spaces at the end.\\

DH
----

I am running v2052 (stable) using VersioningFileProvider. Is there any way to get rid of older versions of a page? Since I found the Preview would often lock up my process with the "Oops you are in conflict" msg, I took to Saving each time, and now have 200 versions :-) I probably still won't use Preview and will end up with another 200, so I would like a way to delete them.

thanks

VS
----

I am looking for an easy way to mark certain versions of a wiki page. 
JSPWiki always shows the latest version of a page, even if that information is 'under construction'.
See [VersionLabel] for more discussion. 
-- [DF|DirkFrederickx]

----

Hi guys, I've been trying to get versioning working without success.

jspwiki.pageProvider=VersioningFileProvider

Then I get the error

ERROR com.ecyrd.jspwiki.providers.CachingProvider - Unable to locate provider class VersioningFileProvider\\
java.lang.ClassNoFoundException: Class not found in search path!\\

Ideas anybody ?

JJH

Check that you don't have extra spaces around the "VersioningFileProvider".

-- JanneJalkanen

Hey, thanks mate that's sorted it.  I thought that I'd previously checked that I've read it above, maybe I've been at this keyboard for too long.\\

So that now appear to work OK, for the record.\\
Fedora Core 2\\
Tomcat 5.5.4\\
Java 1.5.0\\
JSP wiki 2.1.115.alpha\\

JJH
----

I had an idea about using a versioning provider for storing document drafts, which has now been submitted as an idea, as it is not specififc to the Versioning File provider - [IdeaPrivateVersionedDocumentDrafts].

--DavidC, 09-Sep-2006


I use Versioning File Provider to get email notifications... the sad thing is, it does not send email (discover new versions), if I change only the attachments of the page and leave the page itself untouched, any idea?
Maybe I need to use the External Provider based on diff command, but I doubt, it looks like an attachment is not considered as a part of the page and stored in own subfolder.... Of course, I can add my own Provider, but I think somebody has already done this...

--[serge]

Use the RSS feed; it also gives you notifications on the attachment changes!

-- JanneJalkanen

Thanks much, Janne... The thing is I need to configure the jspwiki.pageProvider property, in order to use the automatic email Notificator...

I do not see any provider which implements the VersioningProvider interface in the RSS package....

--[serge]

They have nothing to do with each other.  As long as you have any provider which does versioning (like VersioningFileProvider, JDBCProvider or RCSFileProvider), RSS works automatically.

-- JanneJalkanen


Well, I see it. My goal is to send email automatically to a subscriber when the attachment gets changed... I do not see how RSS can do it, please give me some hints/links if it can.... (I am not very familiar with RSS)

--[serge]


----
Question on Oct 10th, 2011:\\
Can one switch back and forth between {{jspwiki.pageProvider = FileSystemProvider}} and {{jspwiki.pageProvider = VersioningFileProvider}}? \\
I have a JSPWiki using {{FileSystemProvider}} now. I want to switch to {{VersioningFileProvider}} for a test, but I might be forced to switch back, if the user's don't like it.
\\

Additionally: Can I manually delete old versions when using {{VersioningFileProvider}}? I fear that disk usage might increase to heavily. 
\\

Thanks. -- JCKi.

Yes, you can move back and forth between them.  Disk usage in general isn't a problem, but you can remove old versions, but don't leave version gaps - i.e. you can delete versions 1..20, but not 1.10 and 18 and 19.

-- JanneJalkanen