John A Meinel wrote:
> copy_content_into is doing:
>
> destination.set_revision_history(new_history)
> parent = self.get_parent()
> if parent:
> destination.set_parent(parent)
>
>
> So one difference would be to move the 'get_parent()' call into clone()
> instead of being in copy_content. However, I'm pretty sure that
> 'copy_content_into' has an api that says it is cloning the object.
So, copy_content_into is supposed to be a clone sort of operation that
does an exact copy. So if it tries to copy a branch with an invalid
parent, the result should be a branch with an invalid parent. (Because
you may later use the branch from a location where the parent *is* valid.)
e.g. copy_content_into should do
parent = self._get_raw_parent()
if parent:
destination._set_raw_parent(parent)
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John A Meinel wrote: set_revision_ history( new_history) set_parent( parent)
> copy_content_into is doing:
>
> destination.
> parent = self.get_parent()
> if parent:
> destination.
>
>
> So one difference would be to move the 'get_parent()' call into clone()
> instead of being in copy_content. However, I'm pretty sure that
> 'copy_content_into' has an api that says it is cloning the object.
So, copy_content_into is supposed to be a clone sort of operation that
does an exact copy. So if it tries to copy a branch with an invalid
parent, the result should be a branch with an invalid parent. (Because
you may later use the branch from a location where the parent *is* valid.)
e.g. copy_content_into should do raw_parent( ) ._set_raw_ parent( parent)
parent = self._get_
if parent:
destination
Aaron enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://
iD8DBQFEt8+ O0F+nu1YWqI0RAv qNAJ9URjnzY9SaW HXTm6i5GUA1c+ FPeQCghsHD tLwGVkTo=
kV58ugcBZ983QGD
=HR17
-----END PGP SIGNATURE-----