History problem when copying a document

Jonathan.RIBOUX-ojgVOjBmvPKr0CvDWf3zeEZa+K1vlBrA@public.gmane.org
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <3BDECF9A3279DD4A937E17C32159D7B12AA82A@phoenix.hus.chru-strasbourg.fr>
Hello dear list,
 
I have a document with several versions and an history (created, submitted,
published, ...).
When I copy/paste it, the duplicated document keeps the history, even lines
concerning a non existing version.
 
I would like to reset the history of the new document automatically, just
after it is pasted.
 
I tryed to replace those two lines from _unshareContent in
Products/CPSCore/ProxyTool.py :
    history = repotool.getHistory(docid) or ()
    repotool.setHistory(new_docid, history)
With this line :
    repotool.setHistory(new_docid, ())
But I get an incomplete history instead of an empty one.

Is there an other way to do that ? Does anyone have a clue for me ?

I use CPS 3.2.0 but the same issue occurs on CPS 3.4.2.
 
Jonathan Riboux

_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.