Mutating history in Subversion and Bazaar

Aaron Bentley aaron.bentley at utoronto.ca
Tue Aug 29 15:28:16 BST 2006


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

David Allouche wrote:
> I am not familiar with the storage layer of bzr, so I will make some
> (informed) assumptions in the following story.
> 
>   A SVN repository: A->B0->C
>   A bzr-svn branch FOO: A->B0->D
>   The SVN repository is altered: A->B1->C
>   This SVN repository is imported into a new bzr-svn branch BAR.
>   FOO is merged into BAR: A->B1->C->E B1->D->E
> 
> That's where bad things start happening. D is defined in FOO storage as
> a delta from B0, but since BAR already has B1, it will define D by
> applying the B0->D delta on B1. At this point BAR is corrupt although it
> was created initially from a fresh import.

In order for it to be corrupt here, it needs to have a copy of C whose
parent is B0.  (But it doesn't need to be stored in a branch, just
somewhere in the repository.)

Having the old C would prevent the new C from being installed, so you'd
be stuck with the original history.  We don't apply deltas to produce
trees, so the storage wouldn't be corrupted in the way you're thinking.
 In a way, it's worse than Arch, because you may *never* find out that
there are two different versions of C running around.

> You only need to have pulled /at some point/ into your repository a
> branch that contains B0 to contaminate all the branches that use that
> repository, in ways that may not be immediately obvious. This problem is
> non-existent in Subversion because checkouts do not duplicate the
> repository.

It's not B0 that's the problem.  The meaning of B0 was never altered.
The problem is that C's value has been changed, but the two Cs are
indistinguishable.

I still like this quote, though:

< ddaa> pmw: in a distributed system, decisions like that affect the
        rest of the world. It's not about just shooting one's foot off.
        It's about shooting the feet of everybody on the planet wearing
        a specific brand of shoes.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFE9E7/0F+nu1YWqI0RAsKwAJwJ7Nc2AZAt7AFNlqIR9Bzm+LhIVACcClCa
jZYrQ0E3vqOrB1YVeUxd1iY=
=gKRR
-----END PGP SIGNATURE-----




More information about the bazaar mailing list