[ANN] bzr.webdav: a writable hhtp transport

Matthieu Moy Matthieu.Moy at imag.fr
Wed Aug 23 12:51:22 BST 2006


John Arbash Meinel <john at arbash-meinel.com> writes:

> Rather than having 'supports_append()' it might be better to allow
> Transport.append() to raise an AppendNotSupported() execption. And the
> calling code can handle it appropriately.

At best, I think the transport layer should allow two modes of
operation:

* One (the default) in which if "append" fails, the transport
  automatically does a "get + local append + put" (regardless of the
  content, no layering violation).

* The second, in which if "append" fails, the transport raises an
  exception.

This way, the code aware of the content can work with the default
regardless of whether append works, and it can optimize it where
needed optionally.

I'd see something like

    def append(self, relpath, f, mode=None, noerror=True):

This would be nice to solve this problem for both WebDAV and ftp.

-- 
Matthieu




More information about the bazaar mailing list