[MERGE] Convert workingtree.py's use of lock_write to lock_tree_write
John Arbash Meinel
john at arbash-meinel.com
Mon Sep 11 01:21:37 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> All WorkingTree methods which write to the tree, but not to the branch
> have been converted to use ``needs_tree_write_lock`` rather than
> ``needs_write_lock``. Also converted is the revert, conflicts and tree
> transform modules. This provides a modest performance improvement on
> metadir style trees, due to the reduce lock-acquisition, and a more
> significant performance improvement on lightweight checkouts from
> remote branches, where trivial operations used to pay a significant
> penalty. It also provides the basis for allowing readonly checkouts.
> (Robert Collins)
>
> (Hopefully thats self explanatory :)
>
> Next up: anonymous/readonly checkouts.
>
> -Rob
>
...
> @@ -195,6 +200,7 @@
> builder.merge(interesting_ids=["1"])
> self.assertEqual(builder.this.get_file("1").read(), "text4" )
> self.assertEqual(builder.this.get_file("2").read(), "hello1" )
> + builder.cleanup()
>
> def test_file_moves(self):
> """Test moves"""
^- Why all the additions of 'builder.cleanup()'?
Otherwise +1.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFBKwQJdeBCYSNAAMRAuSSAKCgs8Jn0ajnjc4br0LPqcSpEsT6jwCeMwDQ
0BOfSxl7cbQ1eVAiNkgHcss=
=UnYc
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list