[MERGE/HELP!!!] Accelerate build_tree by using working tree files

Aaron Bentley aaron.bentley at utoronto.ca
Wed Dec 19 04:27:00 GMT 2007


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

Hi all,

This patch accelerates branch and checkout by allowing them to use files
from a related working tree, if those files have the correct hash.

Here are the times for branching in a shared with-trees repo:

Old (Best of 4)
real    0m4.922s
user    0m4.320s
sys     0m0.324s

New (Best of 4)
real    0m1.218s
user    0m0.992s
sys     0m0.208s

This is 4.04x faster!

There's just one catch: a seemingly-unrelated test case fails.  Can
anyone with dirstate knowledge sort this out?

./bzr selftest test_merge_other_moves_we_deleted
...FAIL: test_merge_other_moves_we_deleted
(bzrlib.tests.test_merge.TestMerge)
...
Traceback (most recent call last):
  File "/home/abentley/bzr/hardlinks/bzrlib/tests/test_merge.py", line
265, in test_merge_other_moves_we_deleted
    bzrdir_b = tree_a.bzrdir.sprout('B', revision_id='rev-1')
  File "/home/abentley/bzr/hardlinks/bzrlib/bzrdir.py", line 852, in sprout
    wt = result.create_workingtree(accelerator_tree=self_wt)
  File "/home/abentley/bzr/hardlinks/bzrlib/bzrdir.py", line 1132, in
create_workingtree
    accelerator_tree=accelerator_tree)
  File "/home/abentley/bzr/hardlinks/bzrlib/workingtree_4.py", line
1311, in initialize
    transform.build_tree(basis, wt, accelerator_tree)
  File "/home/abentley/bzr/hardlinks/bzrlib/transform.py", line 1349, in
build_tree
    accelerator_tree.unlock()
  File "/home/abentley/bzr/hardlinks/bzrlib/workingtree_4.py", line
1120, in unlock
    self._dirstate.save()
  File "/home/abentley/bzr/hardlinks/bzrlib/dirstate.py", line 1962, in save
    grabbed_write_lock, new_lock = self._lock_token.temporary_write_lock()
  File "/home/abentley/bzr/hardlinks/bzrlib/lock.py", line 190, in
temporary_write_lock
    assert self.filename not in _fcntl_WriteLock._open_locks
AssertionError

- ----------------------------------------------------------------------
Ran 1 test in 0.213s
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHaJ2U0F+nu1YWqI0RAmOEAJ9t5HzKXHQkAbr3U5Tp9Deit7kqEQCeL40t
Y9JpqIpxavRgL5gn0mmR9Mw=
=VVxT
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-mail-uws633.patch
Type: text/x-diff
Size: 19754 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071218/5046425e/attachment-0001.bin 


More information about the bazaar mailing list