[merge] FTP now has and passes regression tests

John Arbash Meinel john at arbash-meinel.com
Wed May 17 18:48:08 BST 2006


Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> The branch is still at:
>>> http://bzr.arbash-meinel.com/branches/bzr/ftp-server/
> 
> I've managed to cut down medusa to a 105K ftp server, and integrated it
> into bzrlib/util.  Branch is here:
> 
> http://panoramicfeedback.com/opensource/bzr/repo/ftp-server/
> 
> Aaron

I think if we do it that way, we could also take some time and clean
things up.

First off, they use 'counter' because they don't want to worry about
overflow. But with a newer python you can just do:
>>> x = int(2**31-1)
>>> x
2147483647
>>> x += 1
>>> x
2147483648L

I don't know when python decided to do automatic upcasting, but
certainly 2.4 has it.

Second, the ftp_channel built into medusa doesn't support append or
rename. Which I fixed by inheriting, and adding the support. On top of
that, medusa objects automatically log through
asyncore.dispatcher.log_info, which only prints to the screen. So I
overrode them to use mutter(). Though really they should probably be
using the logging module.

I suppose we could just propose some patches and get amk to incorporate
them.

But I would agree, 100k isn't a big overhead in exchange for removing
the dependency.

So what do people think, should we incorporate medusa, and then move my
workarounds into it?

What I would really like to see is a semi-official bzr branch of the
original medusa, and then we merge it into bzr and remove the
unnecessary files. (By-value nested tree).

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/20060517/d3a7618f/attachment.pgp 


More information about the bazaar mailing list