I *think* it is python style to place closing braces on the same level as the
content?
> +
> + # Passing in a base version to makeDistroSeriesDifference() creates
> + # it in both distroseries, so we need to do it ourselves.
So, the comment would be much clearer to me like this but maybe that's too
verbose?
# We do not pass in a 'base' version to makeDistroSeriesDifference()
# because it would be created in both distroseries and we don't want
# that. We rather create it ourselves in just the child series.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Steven,
thanks for the quick chat and explanation. I should have looked at more
context but I had hoped to do it quickly.
review approve code
This looks fine to me, only the two issues mentioned on mumble. Please have a
look below.
Cheers,
Henning
Am 14.03.2011 06:23, schrieb Steve Kowalik: registry/ interfaces/ distroseriesdif ference. py' registry/ model/distroser iesdifference. py' registry/ tests/test_ distroseriesdif ference. py' registry/ tests/test_ distroseriesdif ference. py 2011-03-10 11:11:50 +0000 registry/ tests/test_ distroseriesdif ference. py 2011-03-14 05:22:57 +0000
> === modified file 'lib/lp/
> === modified file 'lib/lp/
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -474,7 +474,8 @@
[...]
> @@ -515,6 +517,36 @@ l('1.0' , ds_diff. base_version) base_source_ pub) source_ pub_only_ in_child( self): makeChangelog( makeChangelog( commit( ) # Yay, librarian. makeDistroSerie sDifference( versions= {
> self.assertEqua
> self.assertIs(None, ds_diff.
>
> + def test_base_
> + # If the base version is only published in the child distroseries,
> + # the base source publication is still located and returned.
> + derived_changelog = self.factory.
> + versions=['1.0', '1.2'])
> + parent_changelog = self.factory.
> + versions=['1.0', '1.3'])
> + transaction.
> +
> + ds_diff = self.factory.
> + 'derived': '1.2',
> + 'parent': '1.3',
> + },
> + changelogs={
> + 'derived': derived_changelog,
> + 'parent': parent_changelog,
> + })
This is formatted a bit inconsistently that makes it harder to read. This
would be better, I think.
ds_diff = self.factory. makeDistroSerie sDifference(
versions= {
'derived' : '1.2',
'parent' : '1.3',
changelogs ={
'derived' : derived_changelog,
'parent' : parent_changelog,
},
})
I *think* it is python style to place closing braces on the same level as the
content?
> + sDifference( ) creates
> + # Passing in a base version to makeDistroSerie
> + # it in both distroseries, so we need to do it ourselves.
So, the comment would be much clearer to me like this but maybe that's too
verbose?
# We do not pass in a 'base' version to makeDistroSerie sDifference( )
# because it would be created in both distroseries and we don't want
# that. We rather create it ourselves in just the child series.
> + spr = self.factory. makeSourcePacka geRelease( me=ds_diff. source_ package_ name, version='1.0') makeSourcePacka gePublishingHis tory( ds_diff. derived_ series, sourcepackagere lease=spr, PackagePublishi ngStatus. SUPERSEDED) l('1.0' , ds_diff. base_version) derived_ series, ds_diff. base_source_ pub.distroserie s) kageDiffs( self): makeChangelog(
> + sourcepackagena
> + self.factory.
> + distroseries=
> + status=
> + ds_diff.update()
> + self.assertEqua
> + self.assertEqual(
> + ds_diff.
> +
> def test_requestPac
> # IPackageDiffs are created for the corresponding versions.
> dervied_changelog = self.factory.
>
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
94oUACgkQBT3oW1 L17ihBFwCdHMN+ k5KTZFyzF8rggRt mZzJV 7b2MVoa27NCCUtg Fd
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk1
XosAnjzucBVTeSW
=tbD4
-----END PGP SIGNATURE-----