Comment 7 for bug 52976

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 52976] Re: [Bug 52976] Re: [Bug 52976] Re: [Bug 52976] Re: [Bug 52976] Re: [Bug 52976] Re: [Bug 52976] bzr branch fails to set parent

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Fri, 2006-07-14 at 19:22 +0000, Aaron Bentley wrote:
>>
>> So I propose making it a dumb API, and doing exactly what's requested.
>> Higher-level logic can decide how to handle these cases. I don't
>> expect
>> copy_content_into to be smart.
>
> Agreed - this was the original intent of it.
>
> That is, clone() and sprout() are smart, copy_content_into is the dumb
> workhorse.
>
> Rob

Then I would propose that 'copy_content_to' should not do anything with
the branch parent.
There are currently 2 callers of 'copy_content_to'.

1) clone - This needs to be smart about the branch parent, so that the
final object contains a pointer to the same location.
2) sprout - This is going to set the parent to itself, so it doesn't
care what the old parent was.

Is there plans to have more callers of 'copy_content_to' which would
even want the branch parent to be pointing to an incorrect location? If
you 'clone' to anywhere but a sibling directory (with an identical
parent) the parent pointer is going to be wrong if you copy the raw
pointer location.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEuE/2JdeBCYSNAAMRAu/ZAKCUJJHH/O2Pj9C8n9t2+AiXA+GH9wCeKEk5
83RAtVltkZvxFCRhzo71ODo=
=XoFx
-----END PGP SIGNATURE-----