← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~wgrant/launchpad/upload-notification-dspr into lp:launchpad

 

William Grant has proposed merging lp:~wgrant/launchpad/upload-notification-dspr into lp:launchpad.

Commit message:
Switch upload notifications to link to DistributionSourcePackageRelease rather than DistroSeriesSourcePackageRelease. The latter is pointless and going away soon.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~wgrant/launchpad/upload-notification-dspr/+merge/241194
-- 
https://code.launchpad.net/~wgrant/launchpad/upload-notification-dspr/+merge/241194
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/upload-notification-dspr into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2014-07-09 06:17:31 +0000
+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt	2014-11-09 01:58:07 +0000
@@ -514,7 +514,7 @@
     DEBUG Date: Tue, 25 Apr 2006 10:36:14 -0300
     DEBUG Changed-By: Celso R. Providelo <cprov@xxxxxxxxxx>
     DEBUG Maintainer: Launchpad team <launchpad@xxxxxxxxxxxxxxxxxxx>
-    DEBUG http://launchpad.dev/ubuntu/hoary/+source/bar/1.0-4
+    DEBUG http://launchpad.dev/ubuntu/+source/bar/1.0-4
     DEBUG
     DEBUG ==
     DEBUG
@@ -734,7 +734,7 @@
     Maintainer: Non-ascii maintainer =C4=8Ciha=C5=99 <launchpad@lists.canonical=
     .com>
     Signed-By: Foo Bar <foo.bar@xxxxxxxxxxxxx>
-    http://launchpad.dev/ubuntu/hoary/+source/bar/1.0-10
+    http://launchpad.dev/ubuntu/+source/bar/1.0-10
     <BLANKLINE>
     =3D=3D
     <BLANKLINE>

=== modified file 'lib/lp/soyuz/adapters/notification.py'
--- lib/lp/soyuz/adapters/notification.py	2014-07-09 06:34:14 +0000
+++ lib/lp/soyuz/adapters/notification.py	2014-11-09 01:58:07 +0000
@@ -283,12 +283,8 @@
         'USERS_ADDRESS': config.launchpad.users_address,
         }
     if spr:
-        # Yay, circular imports.
-        from lp.soyuz.model.distroseriessourcepackagerelease import (
-            DistroSeriesSourcePackageRelease,
-            )
-        dsspr = DistroSeriesSourcePackageRelease(distroseries, spr)
-        information['SPR_URL'] = canonical_url(dsspr)
+        information['SPR_URL'] = canonical_url(
+            distroseries.distribution.getSourcePackageRelease(spr))
     changedby_displayname = info['changedby_displayname']
     if changedby_displayname:
         information['CHANGEDBY'] = '\nChanged-By: %s' % changedby_displayname

=== modified file 'lib/lp/soyuz/adapters/tests/test_notification.py'
--- lib/lp/soyuz/adapters/tests/test_notification.py	2014-07-24 09:37:03 +0000
+++ lib/lp/soyuz/adapters/tests/test_notification.py	2014-11-09 01:58:07 +0000
@@ -33,8 +33,8 @@
     )
 from lp.soyuz.interfaces.component import IComponentSet
 from lp.soyuz.model.component import ComponentSelection
-from lp.soyuz.model.distroseriessourcepackagerelease import (
-    DistroSeriesSourcePackageRelease,
+from lp.soyuz.model.distributionsourcepackagerelease import (
+    DistributionSourcePackageRelease,
     )
 from lp.testing import (
     person_logged_in,
@@ -453,7 +453,7 @@
 
         body = assemble_body(blamer, spr, [], archive, series, "",
                              None, "unapproved")
-        dsspr = DistroSeriesSourcePackageRelease(series, spr)
+        dsspr = DistributionSourcePackageRelease(series.distribution, spr)
         url = canonical_url(dsspr)
         self.assertIn(url, body)
 

=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2014-08-09 19:34:08 +0000
+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt	2014-11-09 01:58:07 +0000
@@ -338,7 +338,7 @@
     Changed-By: Celso R. Providelo <cprov@xxxxxxxxxx>
     Maintainer: Launchpad team <launchpad@xxxxxxxxxxxxxxxxxxx>
     Signed-By: "Foo B. Bar" <foo.bar@xxxxxxxxxxxxx>
-    http://launchpad.dev/ubuntutest/breezy/+source/bar/1.0-4
+    http://launchpad.dev/ubuntutest/+source/bar/1.0-4
     <BLANKLINE>
     =3D=3D
     <BLANKLINE>

=== modified file 'lib/lp/soyuz/scripts/tests/test_copypackage.py'
--- lib/lp/soyuz/scripts/tests/test_copypackage.py	2014-08-29 01:15:25 +0000
+++ lib/lp/soyuz/scripts/tests/test_copypackage.py	2014-11-09 01:58:07 +0000
@@ -1466,7 +1466,7 @@
 
             Date: %s
             Changed-By: Foo Bar <foo.bar@xxxxxxxxxxxxx>
-            http://launchpad.dev/ubuntutest/nobby/+source/foo/1.0-2
+            http://launchpad.dev/ubuntutest/+source/foo/1.0-2
             """ % source.sourcepackagerelease.dateuploaded)
         # Spurious newlines are a pain and don't really affect the end
         # results so stripping is the easiest route here.


Follow ups