If what you want to do is remove all old revisions from a document but 
keep the current one, you can use the following :

$doc.document.resetArchive($context.context);

It's not a public API, so you will need to save the page with a users 
who has the programming right granted

Hopes it helps,
Jerome

Tronicek wrote:
> Is there a way to purge document revisions using Velocity or Groovy?
>
> Someone can see actual and last revision by:
> ${doc.getVersion()}<br>
> ${doc.getPreviousDocument().getVersion()}<br>
>
> The next is deleting the document with all revisions...
> Don't try to purge with(!):
> ${doc.getPreviousDocument().delete()}
>
> Thanks,
> Rudolf

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to