[MERGE] Enable writable http transports

Aaron Bentley aaron.bentley at utoronto.ca
Wed Aug 30 17:05:00 BST 2006

Hash: SHA1

Vincent LADEUIL wrote:
>>>>>>"Aaron" == Aaron Bentley <aaron.bentley at utoronto.ca> writes:

>     Aaron> Transport.has itself can be quite flaky on http.
>     Aaron> Perhaps calling rmdir a second time, and asserting
>     Aaron> that it raises NoSuchFile?
> I don't understand what you mean by flaky, 'has' can't pretend a
> deleted directory still exists, does it ?

No, but depending on the server configuration, it may report that an
existing directory does not exist.  This is more true for plain http
servers, but I still try to avoid Transport.has.

>     Aaron> We use the assert family, so assertFalse would be preferable here.

> oooh, I see that comes from unittest.
> ...
> which defines assertFalse as a synonym for failIf :-) 
> What should be done then ?

Mostly, we use assert* in the unit tests, and when we define new
variants, we only define the assert one.  (exceptions being
failUnlessExists and failIfExists).  The fail versions aren't wrong,
just different, and perhaps needlessly so.

> Nice catch. Done. Is there a syntax checker for PEP8 ?

I don't think so.  I'd use it, myself.

>     Aaron> Does your plugin open all http branches, or does it
>     Aaron> use the plain http handlers for non WebDAV urls?
> It register itself for http+webdav, so it *can* be used for read
> only too, but that's a user choice.

Hmm.  There may be a case for allowing users to push to http:// urls,
but perhaps that's for future development.

>     Aaron> Could you please not name your branch
>     Aaron> bzr.webdav/trunk?  The last element of the name should
>     Aaron> be unique to your project, because that's the default
>     Aaron> name used in various places.  Ideally, the last
>     Aaron> element would be the plugin name, i.e. "bzr/webdav" as
>     Aaron> in "bzrlib.plugins.webdav".  "trunk/bzr.webdav" or
>     Aaron> "bzr.webdav.trunk" would also be fine.
> Do you know how to rename a branch from the launchpad web site ?

I haven't tried it.  Possibly an sftp client would work, but I don't use
launchpad SFTP very much.  I get the impression their SFTP server is
rather rigid.

>     Aaron> It's probably a good idea to call Server.__init__ in here (it may do
>     Aaron> something, someday).
> Argh, python newbie error ! Gosh !
> By the way, that's my first attempt at writing python, so feel
> free to make any remark you see fit, they'll be welcome,

It looked pretty good, especially for a new Python programmer.

I'll give this one a +1, though in a perfect world, we wouldn't use

Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org


More information about the bazaar mailing list