[BUG] Getting an empty knit tries to put

Aaron Bentley aaron.bentley at utoronto.ca
Sun Apr 2 22:56:40 BST 2006


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

Robert Collins wrote:
| On Fri, 2006-03-31 at 14:48 -0500, Aaron Bentley wrote:
|>In KnitVersionedFile.__init__, if self.versions() is empty, it will not
|>only produce a new knit, but attempt to write it to the transport.
|
|
| Right, this is by design: VersionedFiles exist on a persistent storage
| place.

So you're saying a VersionedFile must be a representation of a
physically stored object?

If that is the case, I think an attempt to get a VersionedFile that
doesn't exist should throw.  But I think it would be a lot nicer if we
could return an empty versionedfile without having to make it exist on
physical storage first.

| The bug here is that Repository initialisation is 'lazy' and does not
| create empty revision, signature knits.

This is very unexpected behavior to me.  An attempt to read should not
cause an observable write.  I think we will continue to have this bug
appear in various places until we provide a readonly-safe API for
VersionedFile.

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

iD8DBQFEMEiY0F+nu1YWqI0RAv+8AJ95op2f0F/sk4ZiMbFqqPGlkiwjzQCfbR1v
yy0OJaE5+WkyArrt3EYTFr4=
=gMpb
-----END PGP SIGNATURE-----




More information about the bazaar mailing list