aftp:// transport is degenerated to ftp://

John Arbash Meinel john at arbash-meinel.com
Tue Aug 15 16:38:10 BST 2006


Matthieu Moy wrote:
> "ghozzy _" <ghozzy at gmail.com> writes:
> 
>> Would please anyone check if this fix is appropriate and if it is, commit it ?
> 
> Seems OK to me, but I don't know he code well.
> 
> Side note: don't name your patch foo.bar-patch, but instead,
> foo.bar.patch or <whatever>.patch (or .diff) so that your mailer gets
> a chance to provide the correct document type (text/plain or
> text/x-patch).
> 

It seems okay, I think it would be better as:

proto = 'ftp'
if self.is_active:
  proto = 'aftp'
return urlparse.urlunparse((proto, netloc, path, '', '', ''))

That, and we should have a trivial test for this. Such that doing:

t = get_transport('ftp://foo/bar')
self.assertEqual('ftp://foo/bar/', t.abspath(''))

t = get_transport('aftp://foo/bar')
self.assertEqual('aftp://foo/bar/', t.abspath(''))

That way we are sure we properly maintain the 'aftp' notation.

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/20060815/2d9c5879/attachment.pgp 


More information about the bazaar mailing list