Search code examples
pythonalfrescocmis

Alfresco Versioning via cmis setContentStream


I update a pdf file on Alfresco via cmis:

doc.setContentStream(contentFile=tempfile)

Now every time I call this action my Doc version is a minor update in Alfresco. So 1.0 then 1.1 then 1.2. What do I have to add to get a major change to get versions 1.0 2.0 3.0 and so on?

Thanks


Solution

  • I have managed to get major changes by getting an private working copy (pwc) and check this one back in. I have not found the option in python which is given in Java to say major update true or false.

    pwc = doc.checkout()
    pwc.setContentStream(contentFile=tempfile)
    pwc.checkin
    

    With this code i get major updates instead of minor.