mpdiffs, bundles and ghosts
Aaron Bentley
aaron at aaronbentley.com
Mon Jun 2 14:05:48 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> I have a question about the handling of ghosts in mpdiff generation.
>
> It appears that in the presence of ghosts, parents are not diffed
> against.
>
> But, those same parents are used when applying the diff. I believe this
> can cause problems:
>
> source tree - say it has:
> tip:[left, middle, right], middle is a ghost
>
> target tree:
> left: [base]
> middle: [base]
> right: [base]
> (that is, no ghosts)
>
> a mpdiff of tip will reuse text from right by referring to it as 'parent
> 1'
>
> During application to the target, text from middle will be used
> (because middle is parent 1).
This is true. Bundle metadata includes a list of parents, but in the
case of ghosts, that list doesn't match the list used to generate the
mpdiff. It should. (Basically, mpdiff generation should be robust
against ghost parents.)
> Equally, differing parent orders in two repositories can cause confusion
> as well.
I don't think that's true. The ordering given by the bundle metadata
should be used, and that ordering will match the ordering used for
mpdiff generation.
> The root issue AFAICT is that mpdiffs operate solely on text, without
> awareness of parents.
I think it's reasonable for mpdiffs to specify parents by position.
This decouples them from any particular way of naming parents. This is
also what knit deltas do, though with knit deltas, it's implicitly
always parent 0.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIQ/Ar0F+nu1YWqI0RAp2cAKCIkQvZec60122vm0+oo/ZafM2ZtwCfZRCY
DyDCaaDOlz6yYytBqP8lTes=
=3Rv8
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list