[Zope-dev] Typo in Version.py

Jeffrey P Shell jeffrey@Digicool.com
Wed, 18 Oct 2000 09:27:41 -0400


On 10/18/2000 9:04 AM, "Greg Ward" <gward@mems-exchange.org> wrote:

> Now if only I could figure out why Zope is trying to raise that
> exception on me... (I'm not deleting a version, I'm just renaming
> something within a version!)
> 
>       Greg

Because Rename deletes.  The basic sequence of a renameObject command is (in
short):

In short, it:
1.Gets the object off of the objectmanager using the old id.
2.Deletes it from the objectmanager (doesn't delete the object
  itself!).
3.Changes the id of the object.
4.Adds it back to the objectmanager with the new id.

The detailed version is:
1.Check ID (is the new id invalid or already used?), raise
  Invalid ID if so.
2.Get the object using _getOb
3.Check if object supports copying\moving using cb_isMoveable,
  raise CopyError
4.Use _verifyObjectPaste (Does some verification to make sure the
  user.
5.Try to notify recipient of the copy (in this case "self" - the
  ObjectManager or other CopySupport-subclassed class instance),
  if that fails, raise a Rename Error.
6.Delete the object off of the object manager (self._delObject)
7.If possible, get the aq_base of the object, then set the objects
  id to the new id.
8.Set the modified object on the ObjectManager, leaving the ownership
  info unchanged.  (self._setObject).


Jeffrey P Shell, jeffrey@Digicool.com
http://www.digicool.com/ | http://www.zope.org