launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15483
[Merge] lp:~cjwatson/launchpad/queue-copy-archive-links-testfix into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/queue-copy-archive-links-testfix into lp:launchpad.
Commit message:
Fix queue-copy-archive-links test failures.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/queue-copy-archive-links-testfix/+merge/159442
Fixes for buildbot failures caused by https://code.launchpad.net/~cjwatson/launchpad/queue-copy-archive-links/+merge/159250, missed in EC2 test attempt.
bin/test -vvct lib/lp/app/doc/tales.txt -t lp.soyuz.browser.tests.test_queue -t lp.soyuz.tests.test_packageupload -t lp.testing.tests.test_factory -t lib/lp/soyuz/stories/soyuz/xx-build-record.txt -t lib/lp/soyuz/stories/distribution/xx-distribution-packages.txt -t lib/lp/soyuz/stories/webservice/xx-packageupload.txt
--
https://code.launchpad.net/~cjwatson/launchpad/queue-copy-archive-links-testfix/+merge/159442
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/queue-copy-archive-links-testfix into lp:launchpad.
=== modified file 'lib/lp/app/browser/tales.py'
--- lib/lp/app/browser/tales.py 2013-04-17 10:51:39 +0000
+++ lib/lp/app/browser/tales.py 2013-04-17 16:49:29 +0000
@@ -1864,19 +1864,6 @@
final_traversable_names.update(
CustomizableFormatter.final_traversable_names)
- def url(self, view_name=None, rootsite='mainsite'):
- """See `ObjectFormatterAPI`.
-
- The default URL for a distribution main archive is the URL of the
- distribution. Other archive URLs are constructed as normal.
- """
- if self._context.is_main:
- return queryAdapter(
- self._context.distribution, IPathAdapter, 'fmt').url(
- view_name, rootsite)
- else:
- return super(ArchiveFormatterAPI, self).url(view_name, rootsite)
-
def _link_summary_values(self):
"""See CustomizableFormatter._link_summary_values."""
return {'display_name': self._context.displayname}
@@ -1895,7 +1882,12 @@
summary = self._make_link_summary()
css = self.sprite_css()
if check_permission(self._link_permission, self._context):
- url = self.url(view_name)
+ if self._context.is_main:
+ url = queryAdapter(
+ self._context.distribution, IPathAdapter, 'fmt').url(
+ view_name)
+ else:
+ url = self.url(view_name)
return '<a href="%s" class="%s">%s</a>' % (url, css, summary)
else:
if not self._context.private:
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2013-01-22 02:06:59 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2013-04-17 16:49:29 +0000
@@ -98,7 +98,7 @@
Pocket: Release
Component: main
-Re-enable the build in order to avioid subsequent test breakage.
+Re-enable the build in order to avoid subsequent test breakage.
>>> login('foo.bar@xxxxxxxxxxxxx')
>>> build.buildqueue_record.job.resume()
@@ -106,13 +106,13 @@
>>> anon_browser.open(build_url)
The 'Build details' section exists for all status and contains links
-to all the relevant entities involed in this build.
+to all the relevant entities involved in this build.
>>> print anon_browser.getLink('testing - 1.0').url
http://launchpad.dev/ubuntutest/+source/testing/1.0
>>> print anon_browser.getLink('Primary Archive for Ubuntu Test').url
- http://launchpad.dev/ubuntutest/+archive/primary
+ http://launchpad.dev/ubuntutest
>>> print anon_browser.getLink('Breezy Badger Autotest').url
http://launchpad.dev/ubuntutest/breezy-autotest
=== modified file 'lib/lp/soyuz/stories/webservice/xx-packageupload.txt'
--- lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2012-07-02 16:04:09 +0000
+++ lib/lp/soyuz/stories/webservice/xx-packageupload.txt 2013-04-17 16:49:29 +0000
@@ -19,6 +19,7 @@
>>> from lazr.restful.testing.webservice import pprint_entry
>>> pprint_entry(uploads['entries'][0])
archive_link: u'http://.../ubuntu/+archive/primary'
+ copy_source_archive_link: None
custom_file_urls: []
date_created: ...
display_arches: u'source'
Follow ups