[RFC] Multipart support for _urllib_

John Arbash Meinel john at arbash-meinel.com
Wed Jun 21 17:12:58 BST 2006


Michael Ellerman wrote:
> On 6/21/06, John Arbash Meinel <john at arbash-meinel.com> wrote:

...

> Yeah, that's what threw me, the transport tests require a bit of
> reading before it's obvious what's going on. But I think I grok it
> now.
> 
>> I'm not sure what documentation you are looking for, which is probably
>> why it isn't written yet. What would be the most helpful for you?
>>
>> We have some crufts in our tests, since they really just grew, and not
>> all of them were cleaned up as we added cleaner apis to help testing.
> 
> It'd just be good to have some doco on when to use
> run_bzr()/run_bzr_captured()/capture() etc. and all the other helpers,
> assertReMatches() or whatever, and the make_branch_and_tree() or
> whatever helpers. But I don't want to whinge, it's all deducible, just
> a minor barrier.

I would say 'always use only run_bzr()'. The others are all just old
things lying around for compatibility. All with slightly different
semantics, but don't actually add anything valuable. (And if you use the
blackbox base, you get 'runbzr()' which splits its argument on whitespace.)


> 
>> For testing the new code, I could see a few things.
>> Move the _offsets_to_ranges to either be a separated function (say in
>> osutils), or a @staticmethod of the root level transport. (I don't
>> believe it requires any state).
>> And then write a test for it in either tests/test_transport.py or
>> tests/test_osutils.py Which just tests the different overlapping rules.
> 
> I was thinking of making it static on HttpTransportBase, because I
> don't see it really having any use outside of Http, after all they're
> HTTP byte ranges that we're talking about. I've also found
> test_http.py which I think I'll hack on.
> 
> cheers
> 

As I've mentioned in the thread, I think it is useful for sftp, though
maybe it would be better to collapse to a group of start+length pairs,
rather than start+end pairs.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060621/5680cdae/attachment.pgp 


More information about the bazaar mailing list