[merge][#295350] fix another "revision not present" in stacked repositories

John Arbash Meinel john at arbash-meinel.com
Fri Nov 21 21:20:05 GMT 2008


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

John Arbash Meinel wrote:

...

> -                    if basis_parent not in
> self.get_parent_map([basis_parent]):
> +                    #
> +                    # They're required to be physically in this
> +                    # KnitVersionedFiles, not in a fallback.
> +                    if self.missing_keys(parents):
>                          pending = buffered_index_entries.setdefault(
> -                            basis_parent, [])
> +                            parents[0], [])
> 
> 
> ^- I know Aaron asked for this, but it doesn't seem like we should
> actually *require* that both parents be present unless we are actually
> using a multi-parent compression format. Anyway, we can do it either way
> for now, and wait until we actually fix the compression_parent bug to
> address this again.
> 
> (Note that at least at first, if multi-parent compression was used then
> this part: (record.storage_kind in knit_types) would have already
> failed, as multi-parent isn't a known knit_type storage kind.

Interestingly, this change caused the test suite to fail. Specifically,
we have a test that creates a branch with a ghost as the right-hand
parent. And since the ghost can *never* be present, it causes the entry
to get buffered, and will never be written out.

The specific test was bzrlib.tests.test_fetch.TestFetch.test_fetch

It was happening as part of transmitting the Inventory records, which
were delta'd against the left-hand parent (not a ghost) and referenced
the ghosted right-hand parent.

I suppose this couldn't happen for file texts, because we wouldn't know
anything about the right-hand ghost to set a possible parent there. But
we did do it for Inventory records.

So I went ahead and reverted it. I'm working on the compression_parent
fix, which we could expand to allow multi-parent deltas which would then
have multiple compression parents.

Though I'll mention a lot of code assumes that compression parents form
a linear chain, and not a graph.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkknJgUACgkQJdeBCYSNAAPdNACdH++S8/tDDlvdH2InebYwHQKd
ZnUAoKN4vodm1qxAK2yY7SuGwrtXdXqR
=cJn7
-----END PGP SIGNATURE-----



More information about the bazaar mailing list