[RFC] Transport hints
Martin Pool
mbp at canonical.com
Fri Jul 28 11:55:19 BST 2006
On 24 Jul 2006, Robert Collins <robertc at robertcollins.net> wrote:
> > I've been thinking about both sftp and http lately, and how we want to
> > make customized get requests.
> > For sftp, we want to do a get() while disabling prefetch, and for http,
> > we want to do one while disabling automatic following of redirects.
Yes, I think that makes sense to have that, and per-request not per
Transport. We might in future want per-Transport persistent options
too but I don't see a case for it now.
Having a syntax which guards against typos specifying options that make
sense to no Transport would be good.
Another syntax might be
t.get('foo', t.hints(prefetch=False, ...))
where hints is a factory method along the lines of what Robert outlined.
I think that's tolerably concise.
--
Martin
More information about the bazaar
mailing list