[MERGE][#248153] Add autopack RPC
Andrew Bennetts
andrew.bennetts at canonical.com
Fri Oct 31 02:11:46 GMT 2008
Robert Collins wrote:
> On Fri, 2008-10-31 at 02:53 +1100, Andrew Bennetts wrote:
>
> > John Arbash Meinel wrote:
> > ] I agree that returning 'pack-names' seems reasonable, and it shouldn't
> > ] be very hard to factor 'reload_pack_names' one more time to allow
> > ] passing in the name list.
> >
> > Fair enough. It's more than just a list of names, but I've extended the
> > code to do this.
>
> I think this is a bad idea, because its really an internal aspect of the
> repo.
>
> For instance.. in development3, there are more fields. In dev 4 there
> may be less...
As discussed on the list and in person, this change has been reverted.
I've attached the current version, which I think is ready for merging.
The current version also returns ('ok,') rather than an error if a
client for some reason attempts an autopack on a non-pack repository.
It's reasonable for the server to treat a request to autopack non-packs
as a no-op, even though our current client should never attempt it. And
even if the client is so confused/broken that it does try it, it's
likely to fallover badly anyway for other reasons. So returning an
error (including defining a new error code) wasn't really buying us
anything except complexity. Thanks to Robert for the suggestion.
I've also added a test to test_pack_repository that demonstrates that
the RPC is actually used by the client for all the current pack repo
formats. I found when refactoring the code it was remarkably easy to
accidentally cause the special code path that uses the RPC not to be
called, and of course no tests were breaking when I did that. So I
added this test so that next time a test will break :)
In addition, this version also removes a bit of duplication and some
irrelevant changes.
I believe all the review comments I've received (on the list and
elsewhere) have now been addressed. So I'm looking for a blessing to
land this before Martin cuts 1.9rc1... please review!
-Andrew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autopack-rpc-3.diff
Type: text/x-diff
Size: 50966 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081031/1c62d8a2/attachment-0001.bin
More information about the bazaar
mailing list