[MERGE] Transport support for pack repositories
robertc at robertcollins.net
Thu Aug 9 00:03:27 BST 2007
On Wed, 2007-08-08 at 17:54 -0500, John Arbash Meinel wrote:
> Well, isn't that being done at close time? Or are you saying that you
> would stream up to a temporary file. And then rename that over, and
> *that* should check that the file is closed? (I don't think you have a
> way to check that with your current api.)
> Again, it still has an issue that if you never get to that point, you
> still don't know that you forgot to close.
Which is ok, because its no worse than e.g. the SFTP link getting
interrupted - we get a stale file on disk that is incomplete. No biggy.
renaming an open stream though, for append based streams, *is* a big
deal because subsequent writes will go to the wrong place.
> >> In general, I don't prefer global dicts unless we have real cause.
> >> and what happens if we call "open_stream()" for the same URL 2
> >> It
> >> is bad practice, but that doesn't mean it won't ever happen. If you
> >> really want it, it might be good to add _save_file_stream() to
> >> Transport, so that all implementations can share it.
> > Ugh. It should error I think.
> > -Rob
> I'm happy enough with that. As long as it doesn't just override the
> you already have.
I'll work up a patch pronto.
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070809/3d5efa56/attachment.pgp
More information about the bazaar