> Hi there,
>
> This branch updates Launchpad to bzr 2.1rc1. It's mostly very boring fallout from bzrlib's Server class setUp -> start_server renaming although there a few test infrastructure and logging related changes too.
>
Yes, this was actually kind of boring but I managed to stay awake ... ;-)
As a consequence, I only have one marginal suggestion. But if you don't
feel like doing something about it, feel free to land this branch ... ;)
Thank you for doing this boring work!
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Hi there,
>
> This branch updates Launchpad to bzr 2.1rc1. It's mostly very boring fallout from bzrlib's Server class setUp -> start_server renaming although there a few test infrastructure and logging related changes too.
>
Yes, this was actually kind of boring but I managed to stay awake ... ;-)
As a consequence, I only have one marginal suggestion. But if you don't
feel like doing something about it, feel free to land this branch ... ;)
Thank you for doing this boring work!
review approve code
Cheers,
Henning
> === modified file 'lib/lp/ codehosting/ scanner/ branch_ scanner. py' codehosting/ scanner/ branch_ scanner. py 2009-12-17 02:00:16 +0000 codehosting/ scanner/ branch_ scanner. py 2010-02-01 05:13:16 +0000 scanner. bzrsync import ( diff_updates, schedule_ translation_ upload) scanner. fixture import ( event_fixture, run_with_fixture) event_fixture, run_with_fixture, ServerFixture) launchpad. webapp import canonical_url, errorlog translation_ upload, server( ) event_fixture( *event_ handlers) ]) server) , make_zope_ event_fixture( *event_ handlers) ])
> --- lib/lp/
> +++ lib/lp/
> @@ -23,7 +23,7 @@
> from lp.codehosting.
> BzrSync, schedule_
> from lp.codehosting.
> - Fixtures, make_zope_
> + Fixtures, make_zope_
> from canonical.
>
>
> @@ -100,7 +100,8 @@
> schedule_
> ]
> server = get_scanner_
> - fixture = Fixtures([server, make_zope_
> + fixture = Fixtures(
> + [ServerFixture(
Wouldn't it be cool to be able to just do "IFixture(server)" here? See
below.
> self.log. info('Starting branch scanning') IBranchScanner) .getBranchesToS can() fixture( fixture, self.scanBranches, branches) codehosting/ scanner/ fixture. py' codehosting/ scanner/ fixture. py 2009-06-30 16:56:07 +0000 codehosting/ scanner/ fixture. py 2010-02-01 05:13:16 +0000 event_fixture' , event_fixture( *handlers) : map(ZopeEventHa ndlerFixture, handlers)) IFixture)
> branches = getUtility(
> run_with_
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -1,4 +1,4 @@
> -# Copyright 2009 Canonical Ltd. This software is licensed under the
> +# Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
> # GNU Affero General Public License version 3 (see the file LICENSE).
>
> # pylint: disable-msg=E0211
> @@ -16,6 +16,7 @@
> 'IFixture',
> 'make_zope_
> 'run_with_fixture',
> + 'ServerFixture',
> 'with_fixture',
> ]
>
> @@ -121,3 +122,18 @@
>
> def make_zope_
> return Fixtures(
> +
> +
> +class ServerFixture:
> + """Adapt a bzrlib `Server` into an `IFixture`."""
> +
> + implements(
adapts(...)
Maybe this could be registered as a real adapter? But I am not sure if
there is an interface available that could be adapted.
> + start_server( ) stop_server( )
> + def __init__(self, server):
> + self.server = server
> +
> + def setUp(self):
> + self.server.
> +
> + def tearDown(self):
> + self.server.
>
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org
mxtgACgkQBT3oW1 L17iiaIACgv/ EpHTRVrmySnKnWM pawunBD pzcPr+1ETxMfNHB cM
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkt
IykAoMkEW1ptPuR
=aQMJ
-----END PGP SIGNATURE-----