[MERGE] Unique roots for bzr

Aaron Bentley aaron.bentley at utoronto.ca
Mon Oct 16 03:41:41 BST 2006


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

Robert Collins wrote:
> On Sat, 2006-10-14 at 07:52 +1000, John Arbash Meinel wrote:
>>> Unfortunately, MemoryTree doesn't have a persistent inventory-- it's
>>> zapped on unlock.  So every time we locked, we'd get a different
>> root
>>> id.  I don't understand why it's written this way.
>> Well, isn't that a problem with the inventory? Yes we get a new
>> inventory each time, but IIRC it reads it from the branch. I think it
>> was an attempt to move in the direction we want for WorkingTree's,
>> where
>> we don't load the inventory if we don't have to, and operations flush
>> it
>> to disk when unlocked, rather than each operation reading it,
>> modifying
>> it, and writing it out.
> 
> Yes, its precisely that: WorkingTree will be refreshing its memory cache
> too on lock in the future. I dont see how MemoryTree always having the
> Repositories most recent tree as its initial content is a problem. (But
> I'm willing to learn).

Sometimes, the most recent tree is the empty tree.  That's not a good
simulation of a working tree, because all working trees have roots.

I can't commit unless I add the tree root.  But in order to add the tree
root and commit, I must lock the tree, add the tree root, commit (and
unlock).  That's not a good simulation of WorkingTree behavior, because
with a WorkingTree doesn't require a lock to be held while you add.

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

iD8DBQFFMvFl0F+nu1YWqI0RAiHtAJ0b3BMEwKz5pNH4DfiuyXb4ddHRJQCdFCqb
k4ffSHweYW/SCfXPUEnsBVA=
=szL5
-----END PGP SIGNATURE-----




More information about the bazaar mailing list