On 12/20/2011 06:17 AM, Kjartan Hauksson wrote:
Hello all

I intend to do a lot of updates to a single page via a python script but I
don't want/need a huge history file. Is there a way to either disable
versioning for a single page or purging it periodically with a script ?

Disabling history for just one document, no. Resetting, yes.

There's the /reset/ action that can do that manually from the UI, and there's the internal XWikiDocument.resetArchive(xcontext) method that you could use from a script. And you could even make a scheduler job that runs periodically and does that.

If you want to keep a bit of history instead of deleting everything, you could look at what the /deleteversions/ method is doing here:

https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/DeleteVersionsAction.java

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to