[merge] missing locks in test_revision.py

John Arbash Meinel john at arbash-meinel.com
Fri Nov 30 15:24:37 GMT 2007


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

Martin Pool wrote:
> These read locks seem to be necessary in test_revision.py because of
> stricter assertions in pack repositories that they be locked before
> getting graph data.
> 
> It's unfortunate that the repo uses an assert statement because it
> passes with -O (on pqm) but fails without it.
> 
> === modified file 'bzrlib/tests/test_revision.py'
> --- bzrlib/tests/test_revision.py       2007-08-28 06:43:19 +0000
> +++ bzrlib/tests/test_revision.py       2007-11-30 08:23:23 +0000
> @@ -132,6 +132,11 @@
>          revisions_2 = br2.revision_history()
>          sources = br1
> 
> +        br1.lock_read()
> +        br2.lock_read()
> +        self.addCleanup(br1.unlock)
> +        self.addCleanup(br2.unlock)
> +
>          self.assert_(is_ancestor(revisions[0], revisions[0], br1))
>          self.assert_(is_ancestor(revisions[1], revisions[0], sources))
>          self.assert_(not is_ancestor(revisions[0], revisions[1], sources))
> 
> 
> 

bb:approve, but I'll put them into my is_ancestor cleanup branch, as I've
decided to deprecate is_ancestor after all.

John
=:->

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

iD8DBQFHUCs1JdeBCYSNAAMRAr83AKCx/o4JtG5UvHXTkKbr6DRaeQpdNwCeLhOn
13Fw6MsJKMOa7NCtA8P4t7s=
=sKwf
-----END PGP SIGNATURE-----



More information about the bazaar mailing list