[MERGE] Allow insert_record_stream to partially insert a stream rather than error when there are missing compression parents
John Arbash Meinel
john at arbash-meinel.com
Tue Feb 17 21:56:29 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> On Tue, 2009-02-17 at 14:29 -0600, John Arbash Meinel wrote:
>> I would assume you would pull out a lot of the current "unpack as you
>> go" that we have now?
>>
>> I'll also note that if you have a smart server on the other end, it
>> could do the unpacking *for* you, for a stacked branch. The code in
>> insert_record_stream() does that right now (if it sees a delta whose
>> basis is only in the stacked-on location, it expands it to a
>> fulltext).
>> I suppose we can change this to having the client expand things in a
>> second pass, but why not just have the server do it?
>
> The server can't call back to the client to expand it. The way it works
> today is that the client side code expands, as soon as a server is
> actually processing the stream the client can't do it (unless the client
> were to probe for every parent, which is part of the work we're trying
> to avoid).
>
No, we actually expand from the stacked-on location, which the server
knows just as well as the client. It isn't obvious, but that is how
Martin implemented it, rather than requesting more data from the client.
>
>> Actually, you changed the functionality, so that it no longer raises
>> an
>> exception if the stream is incomplete (and cannot be made complete by
>> the stacked-on location). Based on the "supports_partial_insertion"
>> flag.
>
> It's definitely incomplete, but, I don't think the intent is to change
> functionality; repositories that have atomic insertion will still
> require a complete set of data or not; but the exception raising moves
> to commit_write_group() [its lacking in this version of the patch, we
> should get this done today though].
>
> -Rob
Sure, my big concern is that the checking is completely removed by this
patch, not just deferred.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmbMo0ACgkQJdeBCYSNAAMRjACgodIEOwq9eOVg+99A+Rm4eRbT
RloAoLRlNSWfNB8qxsBV6fnT5sZxV8qc
=lACH
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list