paramiko getting offset 0

John Arbash Meinel john at arbash-meinel.com
Wed Aug 1 15:34:09 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Tue, 2007-07-31 at 17:37 -0500, John Arbash Meinel wrote:
>> I don't think we should specifically do that, but I know that at the
>> moment, we
>> use 'put_non_atomic' if we know that the file doesn't exist, and only
>> use
>> 'append' if we have already read it.
> 
> for kndx's perhaps, not so for knits IIRC.

Well, I believe in both cases we do not create the file until we have data for
it. And at that time we know whether we will be appending to existing data, or
starting a new file. (I believe there may be an assumption that if there is not
.kndx there is no .knit, which isn't 100% true, but as we cannot extract any
information from it, it seems like an ok assumption).

> 
>> Maybe a 'file_not_empty' flag to append?
> 
> I think this makes sense.
> 
>> Having a .kndx file claim to be 0 length means that we corrupt it. So
>> I would
>> like to try to be cautious. 
> 
> Indeed :)
> 
> -Rob

Good to have positive feedback.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGsJngJdeBCYSNAAMRApTUAKCy7jyBEKkR/pFoqxli9DoT7vTlbwCeJ1xC
t1tbEeGTspQuIlLQ7HOqLso=
=J2jZ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list