Changeset 29684

Show
Ignore:
Timestamp:
01/27/08 18:38:51 (10 months ago)
Author:
fguillaume
Message:

NXP-1474: Restoring a version doesn't archive the current one (merged 29683 from 1.4 branch)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.core/trunk/nuxeo-core/src/main/java/org/nuxeo/ecm/core/api/AbstractSession.java

    r29682 r29684  
    16021602 
    16031603            DocumentModel docModel = readModel(doc, null); 
     1604 
     1605            // we're about to overwrite the document, make sure it's archived 
     1606            createDocumentSnapshot(docModel); 
     1607 
    16041608            final Map<String, Object> options = new HashMap<String, Object>(); 
    16051609 
     
    16231627 
    16241628            doc.restore(version.getLabel()); 
    1625             doc.checkOut(); // why isn't it already checkedout? 
     1629            // restore gives us a checked in document, so do a checkout 
     1630            doc.checkOut(); 
    16261631 
    16271632            // re-read doc model after restoration