[MERGE] Various test fixes and tweaks for packs.

John Arbash Meinel john at arbash-meinel.com
Fri Sep 21 21:42:00 BST 2007


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

Jelmer Vernooij wrote:
> Am Freitag, den 14.09.2007, 12:27 +1000 schrieb Robert Collins:
>> As the topic says, this is just a bunch of test tweaks I did in the
>> packs branch.
> 
>> @@ -272,7 +276,11 @@
>>          wt = self.make_branch_and_tree('source')
>>          wt.commit('A', allow_pointless=True, rev_id='A')
>>          repo = wt.branch.repository
>> -        repo.sign_revision('A', gpg.LoopbackGPGStrategy(None))
>> +        repo.lock_write()
>> +        repo.start_write_group()
>> +        repo.sign_revision('A', bzrlib.gpg.LoopbackGPGStrategy(None))
>                                    ^^^^ why the change to bzrlib.gpg ?
> That seems inconsistent with what the rest of that file uses. 

When possible we should avoid using "bzrlib.XXX" because it can lead to import
ordering issues. (Module A imports gpg, module B expects it to be already
loaded, Module A stops importing first, module B breaks.)

If the name 'gpg' is the problem, then we generally use "import gpg as
_mod_gpg". But then again, this looks like it is in the test suite, where *I'm*
a lot less picky.

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

iD8DBQFG9CyYJdeBCYSNAAMRArz0AJ9SkKg1YsJTbmfzyvZDzoB9TNZclQCfZIa4
DCKJZPCnTgLODh5crFLpM2k=
=GGwe
-----END PGP SIGNATURE-----



More information about the bazaar mailing list