atomicfile - should it use transports?

Robert Collins robertc at robertcollins.net
Sat Jan 21 00:12:10 GMT 2006


On Sat, 2006-01-21 at 11:03 +1100, Robert Collins wrote:
> On Sat, 2006-01-21 at 10:43 +1100, Martin Pool wrote:
> > On 20 Jan 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> > > Robert Collins wrote:
> > > > On Fri, 2006-01-20 at 16:17 -0600, John Arbash Meinel wrote:
> > > > 
> > > >>The idea is that 'transport.put()' is considered atomic. So for the
> > > >>LocalTransport it uses AtomicFile, for sftp it puts to a temporary
> > > >>file
> > > >>and uses fancy_rename.
> > > >>
> > > >>You can invert the dependencies, but that is the design of the system.
> > 
> > I'm not sure but it seems better to have it this way, i.e. with
> > AtomicFile used by Transport rather than using it.  For some possible
> > transports (DAV?) there might be a better way to atomically put a file.
> 
> This means that all transports that dont have a better way need to use
> the same code right ? Isn't that duplication of effort ?

Actually I can be more clear..

we have two ways to do atomic operations at the moment:
Atomic file for local paths
transports for local paths and remote.

I'd like there to be just one way.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060121/b412ed4c/attachment.pgp 


More information about the bazaar mailing list