Merge lp:~lifeless/launchpad/edge into lp:launchpad

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11796
Proposed branch: lp:~lifeless/launchpad/edge
Merge into: lp:launchpad
Diff against target: 1166 lines (+68/-489)
46 files modified
configs/README.txt (+0/-4)
lib/canonical/config/schema-lazr.conf (+2/-6)
lib/canonical/launchpad/doc/decoratedresultset.txt (+1/-1)
lib/canonical/launchpad/doc/google-searchservice.txt (+2/-2)
lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml (+1/-1)
lib/canonical/launchpad/ftests/googlesearches/googlesearchservice-missing-title.xml (+2/-2)
lib/canonical/launchpad/mail/errortemplates/oops.txt (+1/-1)
lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt (+2/-90)
lib/canonical/launchpad/pagetests/standalone/xx-offsite-form-post.txt (+2/-2)
lib/canonical/launchpad/templates/launchpad-noreferrer.pt (+1/-1)
lib/canonical/launchpad/templates/launchpad-requestexpired.pt (+0/-10)
lib/canonical/launchpad/templates/oops.pt (+0/-20)
lib/canonical/launchpad/testing/browser.py (+1/-1)
lib/canonical/launchpad/tour/bugs (+1/-1)
lib/canonical/launchpad/webapp/servers.py (+0/-4)
lib/canonical/launchpad/webapp/tests/test_servers.py (+0/-13)
lib/devscripts/autoland.py (+1/-1)
lib/lp/app/browser/tests/base-layout.txt (+1/-0)
lib/lp/app/stories/basics/xx-beta-testers-redirection.txt (+0/-256)
lib/lp/app/templates/base-layout-macros.pt (+2/-14)
lib/lp/app/templates/base-layout.pt (+1/-2)
lib/lp/archiveuploader/tests/test_ppauploadprocessor.py (+2/-2)
lib/lp/blueprints/vocabularies/specificationdependency.py (+1/-1)
lib/lp/blueprints/vocabularies/tests/specificationdepcandidates.txt (+1/-1)
lib/lp/bugs/javascript/tests/test_me_too.js (+4/-4)
lib/lp/bugs/model/bug.py (+3/-3)
lib/lp/bugs/model/bugtask.py (+1/-1)
lib/lp/bugs/stories/distribution/xx-distribution-upstream-bug-report.txt (+1/-1)
lib/lp/code/browser/sourcepackagerecipe.py (+1/-1)
lib/lp/code/model/tests/test_branchlookup.py (+1/-3)
lib/lp/registry/help/home-page-staging-help.html (+2/-2)
lib/lp/registry/interfaces/distributionsourcepackage.py (+1/-1)
lib/lp/registry/model/distributionsourcepackage.py (+1/-1)
lib/lp/registry/model/person.py (+1/-1)
lib/lp/services/features/__init__.py (+1/-1)
lib/lp/services/features/webapp.py (+1/-1)
lib/lp/services/mail/tests/incomingmail.txt (+3/-3)
lib/lp/services/memcache/doc/tales-cache.txt (+1/-2)
lib/lp/services/memcache/tales.py (+1/-1)
lib/lp/testing/__init__.py (+1/-1)
lib/lp/translations/templates/translationimportqueue-index.pt (+1/-1)
utilities/on-edge (+11/-17)
utilities/page-performance-report-daily.sh (+0/-1)
utilities/page-performance-report.ini (+5/-5)
utilities/rocketfuel-get (+1/-1)
utilities/rocketfuel-mp-status (+1/-1)
To merge this branch: bzr merge lp:~lifeless/launchpad/edge
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Approve
Review via email: mp+39233@code.launchpad.net

Commit message

Remove the beta redirect and is_edge facilities.

Description of the change

Bye Bye edge.

I thought about keeping the cookie stuff around, but really to do a disable-feature check against it it would need to change anyway, so its better to have someone just resurrect any useful bits from this commit.

Almost entirely mechanical.

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :

Thanks a lot for this work! Great to see it really happening now. Apart from the little glitch in webapp.py I did not find anything. Needless to say, though, that this branch needs to pass the test suite.

Cheers,
Henning

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'configs/README.txt'
--- configs/README.txt 2010-10-18 03:29:59 +0000
+++ configs/README.txt 2010-10-26 01:28:51 +0000
@@ -299,10 +299,6 @@
299 | |299 | |
300 | + staging-mailman/launchpad-lazr.conf300 | + staging-mailman/launchpad-lazr.conf
301 |301 |
302 + edge-lazr.conf
303 | |
304 | + edge<1-4>/launchpad-lazr.conf
305 |
306 + lpnet-lazr.conf302 + lpnet-lazr.conf
307 | |303 | |
308 | + lpnet<1-8>/launchpad-lazr.conf304 | + lpnet<1-8>/launchpad-lazr.conf
309305
=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf 2010-10-22 10:23:44 +0000
+++ lib/canonical/config/schema-lazr.conf 2010-10-26 01:28:51 +0000
@@ -356,8 +356,8 @@
356bzr_lp_prefix: lp:356bzr_lp_prefix: lp:
357357
358# The hosts which may be used to refer to this server's branches in lp: urls358# The hosts which may be used to refer to this server's branches in lp: urls
359# The double-comma is used to produce the empty string.359# The comma is used to produce the empty string.
360lp_url_hosts: edge,,production360lp_url_hosts: ,production
361361
362# see [error_reports].362# see [error_reports].
363error_dir: none363error_dir: none
@@ -988,10 +988,6 @@
988# datatype: boolean988# datatype: boolean
989is_demo: False989is_demo: False
990990
991# Should the 'edge system' indicator in the footer be turned on?
992# Should be true for edge and false for all other live systems.
993is_edge: False
994
995# On launchpad.net, Launchpad's version and revision numbers aren't shown,991# On launchpad.net, Launchpad's version and revision numbers aren't shown,
996# because it's a Web site. Should be True for launchpad.net and False for all992# because it's a Web site. Should be True for launchpad.net and False for all
997# other systems.993# other systems.
998994
=== modified file 'lib/canonical/launchpad/doc/decoratedresultset.txt'
--- lib/canonical/launchpad/doc/decoratedresultset.txt 2010-10-09 16:36:22 +0000
+++ lib/canonical/launchpad/doc/decoratedresultset.txt 2010-10-26 01:28:51 +0000
@@ -75,7 +75,7 @@
7575
76There was a bug in the Storm API whereby calling count (or other aggregates)76There was a bug in the Storm API whereby calling count (or other aggregates)
77on a storm ResultSet does not respect the distinct77on a storm ResultSet does not respect the distinct
78config option (https://bugs.edge.launchpad.net/storm/+bug/217644):78config option (https://bugs.launchpad.net/storm/+bug/217644):
7979
80 >>> from canonical.launchpad.database import (BinaryPackageRelease,80 >>> from canonical.launchpad.database import (BinaryPackageRelease,
81 ... BinaryPackagePublishingHistory)81 ... BinaryPackagePublishingHistory)
8282
=== modified file 'lib/canonical/launchpad/doc/google-searchservice.txt'
--- lib/canonical/launchpad/doc/google-searchservice.txt 2010-10-09 16:36:22 +0000
+++ lib/canonical/launchpad/doc/google-searchservice.txt 2010-10-26 01:28:51 +0000
@@ -300,8 +300,8 @@
300 <M>2</M>300 <M>2</M>
301 ...301 ...
302 <R N="1">302 <R N="1">
303 <U>https://edge.launchpad.net/gc</U>303 <U>https://launchpad.net/gc</U>
304 <UE>https://edge.launchpad.net/gc</UE>304 <UE>https://launchpad.net/gc</UE>
305 <RK>0</RK>305 <RK>0</RK>
306 <S>306 <S>
307 </S>307 </S>
308308
=== modified file 'lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml'
--- lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml 2010-07-16 20:55:29 +0000
+++ lib/canonical/launchpad/ftests/googlesearches/blog.launchpad.net-feed.xml 2010-10-26 01:28:51 +0000
@@ -54,7 +54,7 @@
54 import httplib254 import httplib2
55 [...]]]></description>55 [...]]]></description>
56 <content:encoded><![CDATA[<p>Three tips from <a href="http://launchpad.net/~leonardr">Leonard&#8217;s</a> lightning talk in Prague about writing faster <a href="https://help.launchpad.net/API/launchpadlib#preview">Launchpadlib</a> API clients:</p>56 <content:encoded><![CDATA[<p>Three tips from <a href="http://launchpad.net/~leonardr">Leonard&#8217;s</a> lightning talk in Prague about writing faster <a href="https://help.launchpad.net/API/launchpadlib#preview">Launchpadlib</a> API clients:</p>
57<p><b>1. Use the latest launchpadlib.</b> It gets faster from one release to the next. (The versions in the current Ubuntu release should be fine; otherwise run from the <a href="https://code.edge.launchpad.net/~lazr-developers/launchpadlib/trunk">branch</a> or the latest <a href="https://launchpad.net/launchpadlib/+download">tarball</a>.)</p>57<p><b>1. Use the latest launchpadlib.</b> It gets faster from one release to the next. (The versions in the current Ubuntu release should be fine; otherwise run from the <a href="https://code.launchpad.net/~lazr-developers/launchpadlib/trunk">branch</a> or the latest <a href="https://launchpad.net/launchpadlib/+download">tarball</a>.)</p>
58<p><b>2. Profile:</b></p>58<p><b>2. Profile:</b></p>
59<pre>59<pre>
60 import httplib260 import httplib2
6161
=== modified file 'lib/canonical/launchpad/ftests/googlesearches/googlesearchservice-missing-title.xml'
--- lib/canonical/launchpad/ftests/googlesearches/googlesearchservice-missing-title.xml 2008-05-28 00:48:48 +0000
+++ lib/canonical/launchpad/ftests/googlesearches/googlesearchservice-missing-title.xml 2010-10-26 01:28:51 +0000
@@ -25,8 +25,8 @@
25</NB>25</NB>
2626
27<R N="1">27<R N="1">
28<U>https://edge.launchpad.net/gc</U>28<U>https://launchpad.net/gc</U>
29<UE>https://edge.launchpad.net/gc</UE>29<UE>https://launchpad.net/gc</UE>
30<RK>0</RK>30<RK>0</RK>
31<S>31<S>
32</S>32</S>
3333
=== modified file 'lib/canonical/launchpad/mail/errortemplates/oops.txt'
--- lib/canonical/launchpad/mail/errortemplates/oops.txt 2008-02-13 13:32:25 +0000
+++ lib/canonical/launchpad/mail/errortemplates/oops.txt 2010-10-26 01:28:51 +0000
@@ -3,5 +3,5 @@
3Apologies for the inconvenience.3Apologies for the inconvenience.
44
5If this is blocking your work, please file a question at5If this is blocking your work, please file a question at
6https://answers.edge.launchpad.net/launchpad/+addquestion6https://answers.launchpad.net/launchpad/+addquestion
7and include the error ID %(oops_id)s in the description.7and include the error ID %(oops_id)s in the description.
88
=== modified file 'lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt'
--- lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt 2010-06-16 19:07:12 +0000
+++ lib/canonical/launchpad/pagetests/basics/demo-and-lpnet.txt 2010-10-26 01:28:51 +0000
@@ -51,7 +51,7 @@
51 <style...url(/@@/demo)...</style>51 <style...url(/@@/demo)...</style>
52 ...52 ...
53 >>> print extract_text(find_tag_by_id(browser.contents, 'lp-version'))53 >>> print extract_text(find_tag_by_id(browser.contents, 'lp-version'))
54 &bull; r... devmode demo site54 &bull; r... devmode demo site (get the code)
5555
56 >>> print extract_text(find_tags_by_class(56 >>> print extract_text(find_tags_by_class(
57 ... browser.contents, 'sitemessage')[0])57 ... browser.contents, 'sitemessage')[0])
@@ -70,94 +70,6 @@
7070
71 >>> browser.open('http://launchpad.dev/ubuntu')71 >>> browser.open('http://launchpad.dev/ubuntu')
72 >>> print extract_text(find_tag_by_id(browser.contents, 'lp-version'))72 >>> print extract_text(find_tag_by_id(browser.contents, 'lp-version'))
73 &bull; r... devmode73 &bull; r... devmode (get the code)
74 >>> len(find_tags_by_class(browser.contents, 'sitemessage'))74 >>> len(find_tags_by_class(browser.contents, 'sitemessage'))
75 075 0
76
77
78== Launchpad Edge ==
79
80Additionally, when a server is running as an edge server, the site-message
81is appended with a link to disable edge redirects.
82
83In addition to this prominent display on the root page, most pages will
84also include the disable-redirect link in the site_message - if the
85user is a member of the beta group and has not already disabled
86the redirects.
87
88 # Now setup an edge site-message config and re-check.
89 >>> edge_config_data = """
90 ... [launchpad]
91 ... site_message: This is a beta site.
92 ... is_edge: True
93 ... """
94 >>> config.push('edge_config_data', edge_config_data)
95 >>> beta_browser = setupBrowser(
96 ... auth='Basic beta-admin@launchpad.net:test')
97 >>> beta_browser.open('http://launchpad.dev/ubuntu')
98 >>> site_message = find_tags_by_class(
99 ... beta_browser.contents, 'sitemessage')[0]
100 >>> print extract_text(site_message)
101 This is a beta site. Disable edge redirect.
102 >>> print extract_text(site_message.find(
103 ... 'a', onclick="setBetaRedirect(false)"))
104 Disable edge redirect.
105
106The disable-redirect link will also appear in the site_message when browsed by
107non-beta/anonymous users. This is to reduce the annoyance when users are
108logged into launchpad.net but haven't noticed yet that they need to log into
109edge as well (https://launchpad.net/bugs/160191).
110
111 >>> browser.open('http://launchpad.dev/ubuntu')
112 >>> print extract_text(find_tags_by_class(
113 ... browser.contents, 'sitemessage')[0])
114 This is a beta site. Disable edge redirect.
115
116Once the redirection has been inhibited, the link changes to enable
117redirects.
118
119 # Workaround bug in mechanize where you cannot use the Cookie
120 # header with the CookieJar
121 >>> from mechanize._clientcookie import Cookie
122 >>> cookiejar = (
123 ... beta_browser.mech_browser._ua_handlers['_cookies'].cookiejar)
124 >>> cookiejar.set_cookie(
125 ... Cookie(
126 ... version=0, name='inhibit_beta_redirect', value='1', port=None,
127 ... port_specified=False, domain='.launchpad.dev',
128 ... domain_specified=True, domain_initial_dot=True, path='/',
129 ... path_specified=True, secure=False, expires=None,
130 ... discard=None, comment=None, comment_url=None, rest={}))
131 >>> beta_browser.open('http://launchpad.dev/ubuntu')
132 >>> site_message = find_tags_by_class(
133 ... beta_browser.contents, 'sitemessage')[0]
134 >>> print extract_text(site_message)
135 This is a beta site. Enable edge redirect.
136 >>> print extract_text(site_message.find(
137 ... 'a', onclick="setBetaRedirect(true)"))
138 Enable edge redirect.
139
140 # Remove the specific site-message config data before continuing.
141 >>> dummy = config.pop('edge_config_data')
142
143
144== Launchpad.net ==
145
146On launchpad.net, the version and revision numbers are presented only in an
147HTML comment.
148
149 >>> # Pretend that we're on launchpad.net:
150 >>> test_data = dedent("""
151 ... [launchpad]
152 ... is_lpnet: True
153 ... """)
154 >>> config.push('test_data', test_data)
155
156 >>> browser.open('http://launchpad.dev/ubuntu')
157 >>> print find_tag_by_id(browser.contents, 'lp-version')
158 None
159
160 >>> # Restore the previous config:
161 >>> config_data = config.pop('test_data')
162 >>> print config.launchpad.is_lpnet
163 False
16476
=== modified file 'lib/canonical/launchpad/pagetests/standalone/xx-offsite-form-post.txt'
--- lib/canonical/launchpad/pagetests/standalone/xx-offsite-form-post.txt 2010-03-30 14:33:26 +0000
+++ lib/canonical/launchpad/pagetests/standalone/xx-offsite-form-post.txt 2010-10-26 01:28:51 +0000
@@ -45,7 +45,7 @@
45It also fails if there is no referrer.45It also fails if there is no referrer.
4646
47Note that we have to set up a monkeypatch to test this in order to work47Note that we have to set up a monkeypatch to test this in order to work
48around Zope bug 98437 (https://bugs.edge.launchpad.net/zope3/+bug/98437).48around Zope bug 98437 (https://bugs.launchpad.net/zope3/+bug/98437).
4949
50 >>> from canonical.launchpad.webapp.servers import LaunchpadBrowserRequest50 >>> from canonical.launchpad.webapp.servers import LaunchpadBrowserRequest
51 >>> original_init = LaunchpadBrowserRequest.__init__51 >>> original_init = LaunchpadBrowserRequest.__init__
@@ -87,7 +87,7 @@
87 No REFERER Header87 No REFERER Header
88 ...88 ...
89 >>> browser.getLink('the FAQ').url89 >>> browser.getLink('the FAQ').url
90 'https://answers.edge.launchpad.net/launchpad/+faq/1024'90 'https://answers.launchpad.net/launchpad/+faq/1024'
91 >>> browser.handleErrors = False91 >>> browser.handleErrors = False
9292
93We have a few exceptional cases in which we allow POST requests without a93We have a few exceptional cases in which we allow POST requests without a
9494
=== modified file 'lib/canonical/launchpad/templates/launchpad-noreferrer.pt'
--- lib/canonical/launchpad/templates/launchpad-noreferrer.pt 2010-03-29 16:11:05 +0000
+++ lib/canonical/launchpad/templates/launchpad-noreferrer.pt 2010-10-26 01:28:51 +0000
@@ -15,7 +15,7 @@
15 <code>REFERER</code> headers.</p>15 <code>REFERER</code> headers.</p>
16 <p>Unblock <code>REFERER</code> headers for launchpad.net and try16 <p>Unblock <code>REFERER</code> headers for launchpad.net and try
17 again, or see <a17 again, or see <a
18 href="https://answers.edge.launchpad.net/launchpad/+faq/1024">the18 href="https://answers.launchpad.net/launchpad/+faq/1024">the
19 FAQ <em>Why does Launchpad require a REFERER header?</em></a> for19 FAQ <em>Why does Launchpad require a REFERER header?</em></a> for
20 more information.</p>20 more information.</p>
21 <p>You can also join <a href="irc://irc.freenode.net/launchpad">the21 <p>You can also join <a href="irc://irc.freenode.net/launchpad">the
2222
=== modified file 'lib/canonical/launchpad/templates/launchpad-requestexpired.pt'
--- lib/canonical/launchpad/templates/launchpad-requestexpired.pt 2010-03-10 19:10:04 +0000
+++ lib/canonical/launchpad/templates/launchpad-requestexpired.pt 2010-10-26 01:28:51 +0000
@@ -9,16 +9,6 @@
9 <body>9 <body>
10 <div class="top-portlet" metal:fill-slot="main">10 <div class="top-portlet" metal:fill-slot="main">
11 <h1 class="exception">Timeout error</h1>11 <h1 class="exception">Timeout error</h1>
12 <div tal:condition="is_edge"
13 id="redirect_notice" class="informational message">
14 <p>Our edge server has a lower timeout threshold than launchpad.net,
15 so we can catch those before they hit a wider audience.
16 If this is blocking your work and you are a member of the Launchpad
17 Beta Testers team, you can disable automatic redirection
18 to edge in order to use launchpad.net.</p>
19 <p><button onclick="setBetaRedirect(false)">Disable redirection
20 for 2 hours</button></p>
21 </div>
22 <p>12 <p>
23 Sorry, something just went wrong in Launchpad.13 Sorry, something just went wrong in Launchpad.
24 </p>14 </p>
2515
=== modified file 'lib/canonical/launchpad/templates/oops.pt'
--- lib/canonical/launchpad/templates/oops.pt 2010-03-15 17:58:27 +0000
+++ lib/canonical/launchpad/templates/oops.pt 2010-10-26 01:28:51 +0000
@@ -31,26 +31,6 @@
31 <tal:oops replace="structure view/oops_id_text" />)31 <tal:oops replace="structure view/oops_id_text" />)
32 </p>32 </p>
3333
34 <div id="redirect_notice" style="display:none"
35 class="informational message">
36 <p>This server runs pre-release code, so it's possible this problem
37 doesn't affect launchpad.net. If you're a member of the Launchpad
38 Beta Testers team, you can disable redirection in order to use
39 launchpad.net.</p>
40 <p><button onclick="setBetaRedirect(false)">Disable redirection
41 for 2 hours</button></p>
42 </div>
43 <tal:comment condition="nothing">
44 Can't use the 'is_edge' global because we don't use our page
45 macros here.
46 </tal:comment>
47 <script type="text/javascript">
48 if (document.location.hostname.match('edge.')) {
49 redirect_notice_div = document.getElementById('redirect_notice');
50 redirect_notice_div.style.display = "block";
51 };
52 </script>
53
54 <tal:traceback replace="structure view/maybeShowTraceback" />34 <tal:traceback replace="structure view/maybeShowTraceback" />
5535
56 <div class="related">36 <div class="related">
5737
=== modified file 'lib/canonical/launchpad/testing/browser.py'
--- lib/canonical/launchpad/testing/browser.py 2010-08-20 20:31:18 +0000
+++ lib/canonical/launchpad/testing/browser.py 2010-10-26 01:28:51 +0000
@@ -104,7 +104,7 @@
104 def _clickSubmit(self, form, control, coord):104 def _clickSubmit(self, form, control, coord):
105 # XXX gary 2010-03-08 bug=98437105 # XXX gary 2010-03-08 bug=98437
106 # This change is taken from106 # This change is taken from
107 # https://bugs.edge.launchpad.net/zope3/+bug/98437/comments/9 . It107 # https://bugs.launchpad.net/zope3/+bug/98437/comments/9 . It
108 # should be pushed upstream, per that comment.108 # should be pushed upstream, per that comment.
109 labels = control.get_labels()109 labels = control.get_labels()
110 if labels:110 if labels:
111111
=== modified file 'lib/canonical/launchpad/tour/bugs'
--- lib/canonical/launchpad/tour/bugs 2010-04-21 09:47:58 +0000
+++ lib/canonical/launchpad/tour/bugs 2010-10-26 01:28:51 +0000
@@ -99,7 +99,7 @@
99 Manage bug reports entirely through your email client.99 Manage bug reports entirely through your email client.
100<br /><br />100<br /><br />
101 You can use email to report, subscribe, comment on, assign, prioritise and make just about any other update to bugs tracked in Launchpad. Launchpad will also mail you with updates on any bug you're interested in, whether an individual bug or all the bugs associated with a particular project or package. Read more about <a href="https://help.launchpad.net/Bugs/EmailInterface">the bug tracker's e-mail interface &gt;</a><br /><br />101 You can use email to report, subscribe, comment on, assign, prioritise and make just about any other update to bugs tracked in Launchpad. Launchpad will also mail you with updates on any bug you're interested in, whether an individual bug or all the bugs associated with a particular project or package. Read more about <a href="https://help.launchpad.net/Bugs/EmailInterface">the bug tracker's e-mail interface &gt;</a><br /><br />
102 And, if you prefer, you can also subscribe to bug information in your feed reader with our Atom feeds. <img src="https://edge.launchpad.net/@@/rss" alt="Feed logo" />102 And, if you prefer, you can also subscribe to bug information in your feed reader with our Atom feeds. <img src="https://launchpad.net/@@/rss" alt="Feed logo" />
103 </p>103 </p>
104 </div>104 </div>
105 <div class="block odd">105 <div class="block odd">
106106
=== modified file 'lib/canonical/launchpad/webapp/servers.py'
--- lib/canonical/launchpad/webapp/servers.py 2010-10-18 10:19:56 +0000
+++ lib/canonical/launchpad/webapp/servers.py 2010-10-26 01:28:51 +0000
@@ -620,10 +620,6 @@
620 """As per zope.publisher.browser.BrowserRequest._createResponse"""620 """As per zope.publisher.browser.BrowserRequest._createResponse"""
621 return LaunchpadBrowserResponse()621 return LaunchpadBrowserResponse()
622622
623 def isRedirectInhibited(self):
624 """Returns True if edge redirection has been inhibited."""
625 return self.cookies.get('inhibit_beta_redirect', '0') == '1'
626
627 @cachedproperty623 @cachedproperty
628 def form_ng(self):624 def form_ng(self):
629 """See ILaunchpadBrowserApplicationRequest."""625 """See ILaunchpadBrowserApplicationRequest."""
630626
=== modified file 'lib/canonical/launchpad/webapp/tests/test_servers.py'
--- lib/canonical/launchpad/webapp/tests/test_servers.py 2010-09-28 07:00:56 +0000
+++ lib/canonical/launchpad/webapp/tests/test_servers.py 2010-10-26 01:28:51 +0000
@@ -485,19 +485,6 @@
485 "The query_string_params dict correctly interprets encoded "485 "The query_string_params dict correctly interprets encoded "
486 "parameters.")486 "parameters.")
487487
488 def test_isRedirectInhibited_without_cookie(self):
489 # When the request doesn't include the inhibit_beta_redirect cookie,
490 # isRedirectInhibited() returns False.
491 request = LaunchpadBrowserRequest('', {})
492 self.assertFalse(request.isRedirectInhibited())
493
494 def test_isRedirectInhibited_with_cookie(self):
495 # When the request includes the inhibit_beta_redirect cookie,
496 # isRedirectInhibited() returns True.
497 request = LaunchpadBrowserRequest(
498 '', dict(HTTP_COOKIE="inhibit_beta_redirect=1"))
499 self.assertTrue(request.isRedirectInhibited())
500
501488
502def test_suite():489def test_suite():
503 suite = unittest.TestSuite()490 suite = unittest.TestSuite()
504491
=== modified file 'lib/devscripts/autoland.py'
--- lib/devscripts/autoland.py 2010-09-02 20:25:02 +0000
+++ lib/devscripts/autoland.py 2010-10-26 01:28:51 +0000
@@ -28,7 +28,7 @@
28 self._launchpad = launchpad28 self._launchpad = launchpad
2929
30 @classmethod30 @classmethod
31 def load(cls, service_root='edge'):31 def load(cls, service_root='production'):
32 # XXX: JonathanLange 2009-09-24: No unit tests.32 # XXX: JonathanLange 2009-09-24: No unit tests.
33 # XXX: JonathanLange 2009-09-24 bug=435813: If cached data invalid,33 # XXX: JonathanLange 2009-09-24 bug=435813: If cached data invalid,
34 # there's no easy way to delete it and try again.34 # there's no easy way to delete it and try again.
3535
=== modified file 'lib/lp/app/browser/tests/base-layout.txt'
--- lib/lp/app/browser/tests/base-layout.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/app/browser/tests/base-layout.txt 2010-10-26 01:28:51 +0000
@@ -172,6 +172,7 @@
172 Terms of use http://launchpad.dev/legal172 Terms of use http://launchpad.dev/legal
173 Contact Launchpad Support /feedback173 Contact Launchpad Support /feedback
174 System status http://identi.ca/launchpadstatus174 System status http://identi.ca/launchpadstatus
175 get the code https://code.launchpad.net/~launchpad-pqm/launchpad/stable/
175176
176177
177Page registering178Page registering
178179
=== removed file 'lib/lp/app/stories/basics/xx-beta-testers-redirection.txt'
--- lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 2010-10-17 15:44:08 +0000
+++ lib/lp/app/stories/basics/xx-beta-testers-redirection.txt 1970-01-01 00:00:00 +0000
@@ -1,256 +0,0 @@
1= Redirection of Beta Testers =
2
3Launchpad occasionally runs private beta tests of large
4changes. During these times, members of the launchpad-beta-testers
5team have access to a separate web app running off the same database.
6
7To encourage members of this team to use the beta UI, we automatically
8redirect them to the beta site when they use the main site.
9
10For these tests, we will use the user 'launchpad-beta-owner', who is
11on the beta testers team. First, create a browser object for this
12person:
13
14 >>> beta_browser = setupBrowser(auth='Basic beta-admin@launchpad.net:test')
15
16# XXX jamesh 2007-01-31 bug=98482:
17# zope.testbrowser does not handle redirects to remote sites, so we
18# disable the redirection handling at the mechanize layer. We then need
19# to check the HTTPError directly.
20
21 >>> user_browser.mech_browser.set_handle_redirect(False)
22 >>> beta_browser.mech_browser.set_handle_redirect(False)
23 >>> from urllib2 import HTTPError
24 >>> def check(function, *args, **kwargs):
25 ... try:
26 ... function(*args, **kwargs)
27 ... except HTTPError, exc:
28 ... print str(exc)
29 ... location = exc.hdrs.getheader('Location')
30 ... if location is not None:
31 ... print 'Location:', location
32
33The redirection is controlled by the beta_testers_redirection_host
34config item. If it is set to None, no redirection occurs:
35
36 >>> from canonical.config import config
37
38 >>> print config.launchpad.beta_testers_redirection_host
39 None
40 >>> check(beta_browser.open, 'http://launchpad.dev/ubuntu')
41 >>> print beta_browser.url
42 http://launchpad.dev/ubuntu
43
44Normally, we run the development system (launchpad.dev) with no beta
45redirection host. For the purposes of this test, however, we will set it to
46beta.launchpad.dev:
47
48 >>> beta_data = """
49 ... [launchpad]
50 ... beta_testers_redirection_host = beta.launchpad.dev
51 ... """
52 >>> config.push('beta_data', beta_data)
53
54If a normal user goes to a page on the site, it will load as normal:
55
56 >>> check(user_browser.open, 'http://launchpad.dev/ubuntu')
57 >>> print user_browser.url
58 http://launchpad.dev/ubuntu
59
60In contrast, members of the beta testers get redirected:
61
62 >>> check(beta_browser.open, 'http://launchpad.dev/ubuntu')
63 HTTP Error 303: See Other
64 Location: http://beta.launchpad.dev/ubuntu
65
66The redirection also works for URLs below the root, and with query
67parameters:
68
69 >>> check(beta_browser.open,
70 ... 'http://launchpad.dev/ubuntu/+search?text=foo')
71 HTTP Error 303: See Other
72 Location: http://beta.launchpad.dev/ubuntu/+search?text=foo
73
74However, HTTP POST requests to the normal site are not redirected:
75
76 >>> from urllib import urlencode
77 >>> check(beta_browser.open,
78 ... 'http://launchpad.dev/ubuntu/+search',
79 ... data=urlencode({'text': 'foo'}))
80 >>> print beta_browser.url
81 http://launchpad.dev/ubuntu/+search
82
83The redirection works for other Launchpad subdomains:
84
85 >>> check(beta_browser.open,
86 ... 'http://bugs.launchpad.dev/launchpad/+bugs?orderby=-datecreated')
87 HTTP Error 303: See Other
88 Location: http://bugs.beta.launchpad.dev/launchpad/+bugs?orderby=-datecreated
89
90 >>> check(beta_browser.open, 'http://answers.launchpad.dev/~name12')
91 HTTP Error 303: See Other
92 Location: http://answers.beta.launchpad.dev/~name12
93
94However, domains not under the main site will not be redirected:
95
96 # Go behing the curtains and change the hostname of our mainsite so that
97 # we can test this.
98 >>> config.push('mainsite_data', """
99 ... [vhost.mainsite]
100 ... hostname: foo.dev
101 ... """)
102
103 >>> check(beta_browser.open, 'http://launchpad.dev/~name12')
104 >>> print beta_browser.url
105 http://launchpad.dev/~name12
106
107 # Now retore our mainsite's hostname.
108 >>> dummy = config.pop('mainsite_data')
109
110The front page of Launchpad does not redirect.
111
112 >>> check(beta_browser.open, 'http://launchpad.dev/')
113 >>> print beta_browser.url
114 http://launchpad.dev/
115
116On the beta site, a client side JS is available on every page (except
117the home page) in the footer that sets a cookie to inhibit
118the redirection.
119
120 # Configure the site as the beta site.
121 >>> config.push('fake_beta_site', """
122 ... [launchpad]
123 ... beta_testers_redirection_host = none
124 ... is_edge: True
125 ... site_message: This is the beta site
126 ... """)
127
128 >>> check(beta_browser.open, 'http://launchpad.dev/ubuntu')
129 >>> print beta_browser.url
130 http://launchpad.dev/ubuntu
131 >>> print find_tags_by_class(beta_browser.contents, 'sitemessage')[0]
132 <div class="sitemessage">
133 This is the beta site
134 <a href="#" class="js-action" onclick="setBetaRedirect(false)">
135 Disable edge redirect.
136 </a>
137 </div>
138
139 >>> dummy = config.pop('fake_beta_site')
140
141 # Workaround bug in mechanize where you cannot use the Cookie
142 # header with the CookieJar
143 >>> from mechanize._clientcookie import Cookie
144 >>> cookiejar = (
145 ... beta_browser.mech_browser._ua_handlers['_cookies'].cookiejar)
146 >>> cookiejar.set_cookie(
147 ... Cookie(
148 ... version=0, name='inhibit_beta_redirect', value='1', port=None,
149 ... port_specified=False, domain='.launchpad.dev',
150 ... domain_specified=True, domain_initial_dot=True, path='/',
151 ... path_specified=True, secure=False, expires=None,
152 ... discard=None, comment=None, comment_url=None, rest={}))
153
154Now when they go to a page on the site, it loads as normal:
155
156 >>> check(beta_browser.open, 'http://launchpad.dev/ubuntu')
157 >>> print beta_browser.url
158 http://launchpad.dev/ubuntu
159
160
161== Shortcut redirection for bugs ==
162
163A bug URL, such as http://launchpad.dev/bugs/12, is commonly hit
164directly and then, eventually, redirected to a bug task such as
165https://bugs.launchpad.dev/jokosher/+bug/12. These bug URLs can be
166redirected with fewer steps than the four it would normally take.
167
168The normal user gets redirected to the bug task page.
169
170 >>> check(user_browser.open, 'http://launchpad.dev/bugs/12')
171 HTTP Error 303: See Other
172 Location: http://bugs.launchpad.dev/jokosher/+bug/12
173
174An anonymous user gets redirected to the bug task page.
175
176 >>> anon_browser.mech_browser.set_handle_redirect(False)
177 >>> check(anon_browser.open, 'http://launchpad.dev/bugs/12')
178 HTTP Error 303: See Other
179 Location: http://bugs.launchpad.dev/jokosher/+bug/12
180
181The beta user gets redirected to the bug task page, but on the beta
182host.
183
184 >>> # Create a new beta browser that doesn't have redirection
185 >>> # override cookies.
186 >>> beta_browser = setupBrowser(auth='Basic beta-admin@launchpad.net:test')
187 >>> beta_browser.mech_browser.set_handle_redirect(False)
188 >>> check(beta_browser.open, 'http://launchpad.dev/bugs/12')
189 HTTP Error 303: See Other
190 Location: http://bugs.beta.launchpad.dev/jokosher/+bug/12
191
192Restore the config to state it was in at the start of the test.
193
194 >>> config_data = config.pop('beta_data')
195
196
197== Redirection notice in OOPS timeouts ==
198
199The beta site has timeout values lower than lpnet, so beta testers are more
200likely to experience timeouts. When a page times out for beta testers the
201notification to disable beta redirection is displayed.
202
203Add Foo Bar to the beta team.
204
205 >>> from zope.component import getUtility
206 >>> from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
207 >>> from lp.registry.interfaces.person import IPersonSet
208 >>> from canonical.launchpad.ftests import login, logout
209 >>> login('foo.bar@canonical.com')
210 >>> foo_bar = getUtility(IPersonSet).getByName('name16')
211 >>> launchpad_beta_testers = getUtility(
212 ... ILaunchpadCelebrities).launchpad_beta_testers
213 >>> ignored = launchpad_beta_testers.addMember(foo_bar, reviewer=foo_bar)
214 >>> foo_bar.inTeam(launchpad_beta_testers)
215 True
216
217 >>> logout()
218
219Decrease the timeout values for launchpad.dev and pretend we're on the edge
220server.
221
222 >>> beta_data = """
223 ... [launchpad]
224 ... is_edge: True
225 ... [database]
226 ... db_statement_timeout: 1
227 ... soft_request_timeout: 2
228 ... """
229 >>> config.push('beta_data', beta_data)
230
231Check that the notification is in the timeout page
232
233 >>> print http(r"""
234 ... GET /+soft-timeout HTTP/1.1
235 ... Authorization: Basic Zm9vLmJhckBjYW5vbmljYWwuY29tOnRlc3Q=
236 ... """)
237 HTTP/1.1 503 Service Unavailable
238 ...
239 Retry-After: 900
240 ...
241 <title>Error: Timeout</title>
242 ...
243 <h1 class="exception">Timeout error</h1>
244 ...
245 <p>Our edge server has a lower timeout threshold than launchpad.net,
246 so we can catch those before they hit a wider audience.
247 If this is blocking your work and you are a member of the Launchpad
248 Beta Testers team, you can disable automatic redirection
249 to edge in order to use launchpad.net.</p>
250 <p><button onclick="setBetaRedirect(false)">Disable redirection
251 for 2 hours</button></p>
252 ...
253
254Restore the config to state it was in at the start of the test.
255
256 >>> config_data = config.pop('beta_data')
2570
=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
--- lib/lp/app/templates/base-layout-macros.pt 2010-10-04 12:23:40 +0000
+++ lib/lp/app/templates/base-layout-macros.pt 2010-10-26 01:28:51 +0000
@@ -424,15 +424,13 @@
424 &nbsp;&bull;&nbsp;424 &nbsp;&bull;&nbsp;
425 <a href="http://identi.ca/launchpadstatus"425 <a href="http://identi.ca/launchpadstatus"
426 >System status</a>426 >System status</a>
427 <span id="lp-version" tal:condition="not:is_lpnet">427 <span id="lp-version">
428 &nbsp;&bull;&nbsp;428 &nbsp;&bull;&nbsp;
429 r<tal:revno replace="revno" />429 r<tal:revno replace="revno" />
430 <tal:devmode condition="devmode">devmode</tal:devmode>430 <tal:devmode condition="devmode">devmode</tal:devmode>
431 <tal:demo condition="is_demo">demo site</tal:demo>431 <tal:demo condition="is_demo">demo site</tal:demo>
432 <tal:edge condition="is_edge">432 (<a href="https://code.launchpad.net/~launchpad-pqm/launchpad/stable/"
433 beta site (<a href="https://code.edge.launchpad.net/~launchpad-pqm/launchpad/stable/"
434 >get the code</a>)433 >get the code</a>)
435 </tal:edge>
436 </span>434 </span>
437 </div>435 </div>
438 </div>436 </div>
@@ -443,16 +441,6 @@
443 <tal:site_message tal:content="structure site_message">441 <tal:site_message tal:content="structure site_message">
444 This site is running pre-release code.442 This site is running pre-release code.
445 </tal:site_message>443 </tal:site_message>
446 <tal:edge_only condition="is_edge">
447 <a href="#" class="js-action" onclick="setBetaRedirect(false)"
448 tal:condition="not:request/isRedirectInhibited">
449 Disable edge redirect.
450 </a>
451 <a href="#" class="js-action" onclick="setBetaRedirect(true)"
452 tal:condition="request/isRedirectInhibited">
453 Enable edge redirect.
454 </a>
455 </tal:edge_only>
456 </div>444 </div>
457</metal:site-message>445</metal:site-message>
458446
459447
=== modified file 'lib/lp/app/templates/base-layout.pt'
--- lib/lp/app/templates/base-layout.pt 2010-08-19 16:04:43 +0000
+++ lib/lp/app/templates/base-layout.pt 2010-10-26 01:28:51 +0000
@@ -9,7 +9,6 @@
9 devmode modules/canonical.config/config/devmode;9 devmode modules/canonical.config/config/devmode;
10 rooturl modules/canonical.launchpad.webapp.vhosts/allvhosts/configs/mainsite/rooturl;10 rooturl modules/canonical.launchpad.webapp.vhosts/allvhosts/configs/mainsite/rooturl;
11 is_demo modules/canonical.config/config/launchpad/is_demo;11 is_demo modules/canonical.config/config/launchpad/is_demo;
12 is_edge modules/canonical.config/config/launchpad/is_edge;
13 is_lpnet modules/canonical.config/config/launchpad/is_lpnet;12 is_lpnet modules/canonical.config/config/launchpad/is_lpnet;
14 site_message modules/canonical.config/config/launchpad/site_message;13 site_message modules/canonical.config/config/launchpad/site_message;
15 icingroot string:${rooturl}+icing/rev${revno};14 icingroot string:${rooturl}+icing/rev${revno};
@@ -72,7 +71,7 @@
72 ${view/context/fmt:public-private-css}71 ${view/context/fmt:public-private-css}
73 yui-skin-sam">72 yui-skin-sam">
74 <script type="text/javascript"73 <script type="text/javascript"
75 tal:condition="python: is_edge or is_lpnet">74 tal:condition="python: is_lpnet">
76 var _gaq = _gaq || [];75 var _gaq = _gaq || [];
77 _gaq.push(['_setAccount', 'UA-12833497-1']);76 _gaq.push(['_setAccount', 'UA-12833497-1']);
78 _gaq.push(['_setDomainName', '.launchpad.net']);77 _gaq.push(['_setDomainName', '.launchpad.net']);
7978
=== modified file 'lib/lp/archiveuploader/tests/test_ppauploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-10-22 14:54:39 +0000
+++ lib/lp/archiveuploader/tests/test_ppauploadprocessor.py 2010-10-26 01:28:51 +0000
@@ -484,7 +484,7 @@
484 Anyone listed as an uploader in ArchivePermissions will automatically484 Anyone listed as an uploader in ArchivePermissions will automatically
485 get an upload notification email.485 get an upload notification email.
486486
487 See https://bugs.edge.launchpad.net/soyuz/+bug/397077487 See https://bugs.launchpad.net/soyuz/+bug/397077
488 """488 """
489 # Create the extra permissions. We're making an extra team and489 # Create the extra permissions. We're making an extra team and
490 # adding it to cprov's upload permission, plus name12.490 # adding it to cprov's upload permission, plus name12.
@@ -1040,7 +1040,7 @@
10401040
1041 Some error messages can contain the PPA display name, which may1041 Some error messages can contain the PPA display name, which may
1042 sometimes contain unicode characters. There was a bug1042 sometimes contain unicode characters. There was a bug
1043 https://bugs.edge.launchpad.net/bugs/275509 reported about getting1043 https://bugs.launchpad.net/bugs/275509 reported about getting
1044 upload errors related to unicode. This only happened when the1044 upload errors related to unicode. This only happened when the
1045 uploder was attaching a .orig.tar.gz file with different contents1045 uploder was attaching a .orig.tar.gz file with different contents
1046 than the one already in the PPA.1046 than the one already in the PPA.
10471047
=== modified file 'lib/lp/blueprints/vocabularies/specificationdependency.py'
--- lib/lp/blueprints/vocabularies/specificationdependency.py 2010-09-26 22:29:58 +0000
+++ lib/lp/blueprints/vocabularies/specificationdependency.py 2010-10-26 01:28:51 +0000
@@ -97,7 +97,7 @@
97 This implementation is a little fuzzy and will return specs for URLs97 This implementation is a little fuzzy and will return specs for URLs
98 that, for example, don't have the host name right. This seems98 that, for example, don't have the host name right. This seems
99 unlikely to cause confusion in practice, and being too anal probably99 unlikely to cause confusion in practice, and being too anal probably
100 would be confusing (e.g. not accepting edge URLs on lpnet).100 would be confusing (e.g. not accepting production URLs on staging).
101 """101 """
102 scheme, netloc, path, params, args, fragment = urlparse(url)102 scheme, netloc, path, params, args, fragment = urlparse(url)
103 if not scheme or not netloc:103 if not scheme or not netloc:
104104
=== modified file 'lib/lp/blueprints/vocabularies/tests/specificationdepcandidates.txt'
--- lib/lp/blueprints/vocabularies/tests/specificationdepcandidates.txt 2010-08-27 04:24:55 +0000
+++ lib/lp/blueprints/vocabularies/tests/specificationdepcandidates.txt 2010-10-26 01:28:51 +0000
@@ -90,7 +90,7 @@
90appropriately. Queries conataining regual expression operators, for90appropriately. Queries conataining regual expression operators, for
91example, will simply look for the respective characters within the91example, will simply look for the respective characters within the
92vocabulary's item (this used to be the cause of an OOPS, see92vocabulary's item (this used to be the cause of an OOPS, see
93https://bugs.edge.launchpad.net/blueprint/+bug/139385 for more93https://bugs.launchpad.net/blueprint/+bug/139385 for more
94details).94details).
9595
96 >>> list(naked_vocab.search('*'))96 >>> list(naked_vocab.search('*'))
9797
=== modified file 'lib/lp/bugs/javascript/tests/test_me_too.js'
--- lib/lp/bugs/javascript/tests/test_me_too.js 2010-07-11 00:32:53 +0000
+++ lib/lp/bugs/javascript/tests/test_me_too.js 2010-10-26 01:28:51 +0000
@@ -53,19 +53,19 @@
53 var inpage = Y.Node.create([53 var inpage = Y.Node.create([
54 '<span id="affectsmetoo">',54 '<span id="affectsmetoo">',
55 ' <span class="static">',55 ' <span class="static">',
56 ' <img src="https://bugs.edge.launchpad.net/@@/flame-icon" alt="" />',56 ' <img src="https://bugs.launchpad.net/@@/flame-icon" alt="" />',
57 ' This bug affects me too',57 ' This bug affects me too',
58 ' <a href="+affectsmetoo">',58 ' <a href="+affectsmetoo">',
59 ' <img class="editicon" alt="Edit"',59 ' <img class="editicon" alt="Edit"',
60 ' src="https://bugs.edge.launchpad.net/@@/edit" />',60 ' src="https://bugs.launchpad.net/@@/edit" />',
61 ' </a>',61 ' </a>',
62 ' </span>',62 ' </span>',
63 ' <span class="dynamic unseen">',63 ' <span class="dynamic unseen">',
64 ' <img class="editicon" alt="Edit"',64 ' <img class="editicon" alt="Edit"',
65 ' src="https://bugs.edge.launchpad.net/@@/edit" />',65 ' src="https://bugs.launchpad.net/@@/edit" />',
66 ' <a href="+affectsmetoo" class="js-action"',66 ' <a href="+affectsmetoo" class="js-action"',
67 ' ><span class="value">Does this bug affect you?</span></a>',67 ' ><span class="value">Does this bug affect you?</span></a>',
68 ' <img src="https://bugs.edge.launchpad.net/@@/flame-icon" alt=""/>',68 ' <img src="https://bugs.launchpad.net/@@/flame-icon" alt=""/>',
69 ' </span>',69 ' </span>',
70 '</span>'].join(''));70 '</span>'].join(''));
71 Y.one("body").appendChild(inpage);71 Y.one("body").appendChild(inpage);
7272
=== modified file 'lib/lp/bugs/model/bug.py'
--- lib/lp/bugs/model/bug.py 2010-10-25 21:37:12 +0000
+++ lib/lp/bugs/model/bug.py 2010-10-26 01:28:51 +0000
@@ -946,12 +946,12 @@
946 # (person X is in the team X)946 # (person X is in the team X)
947 TeamParticipation.person == person.id,947 TeamParticipation.person == person.id,
948 # XXX: Storm fails to compile this, so manually done.948 # XXX: Storm fails to compile this, so manually done.
949 # bug=https://bugs.edge.launchpad.net/storm/+bug/627137949 # bug=https://bugs.launchpad.net/storm/+bug/627137
950 # RBC 20100831950 # RBC 20100831
951 SQL("""TeamParticipation.team = BugSubscription.person"""),951 SQL("""TeamParticipation.team = BugSubscription.person"""),
952 # Join in the Person rows we want952 # Join in the Person rows we want
953 # XXX: Storm fails to compile this, so manually done.953 # XXX: Storm fails to compile this, so manually done.
954 # bug=https://bugs.edge.launchpad.net/storm/+bug/627137954 # bug=https://bugs.launchpad.net/storm/+bug/627137
955 # RBC 20100831955 # RBC 20100831
956 SQL("""Person.id = TeamParticipation.team"""),956 SQL("""Person.id = TeamParticipation.team"""),
957 ).order_by(Person.name),957 ).order_by(Person.name),
@@ -1658,7 +1658,7 @@
1658 self.date_made_private = None1658 self.date_made_private = None
16591659
1660 # XXX: This should be a bulk update. RBC 201008271660 # XXX: This should be a bulk update. RBC 20100827
1661 # bug=https://bugs.edge.launchpad.net/storm/+bug/6250711661 # bug=https://bugs.launchpad.net/storm/+bug/625071
1662 for attachment in self.attachments_unpopulated:1662 for attachment in self.attachments_unpopulated:
1663 attachment.libraryfile.restricted = private1663 attachment.libraryfile.restricted = private
16641664
16651665
=== modified file 'lib/lp/bugs/model/bugtask.py'
--- lib/lp/bugs/model/bugtask.py 2010-10-25 21:37:12 +0000
+++ lib/lp/bugs/model/bugtask.py 2010-10-26 01:28:51 +0000
@@ -1492,7 +1492,7 @@
1492 """See `IBugTaskSet`."""1492 """See `IBugTaskSet`."""
1493 # XXX: JSK: 2007-12-19: This method should probably return1493 # XXX: JSK: 2007-12-19: This method should probably return
1494 # None when task_id is not present. See:1494 # None when task_id is not present. See:
1495 # https://bugs.edge.launchpad.net/launchpad/+bug/1235921495 # https://bugs.launchpad.net/launchpad/+bug/123592
1496 try:1496 try:
1497 bugtask = BugTask.get(task_id)1497 bugtask = BugTask.get(task_id)
1498 except SQLObjectNotFound:1498 except SQLObjectNotFound:
14991499
=== modified file 'lib/lp/bugs/stories/distribution/xx-distribution-upstream-bug-report.txt'
--- lib/lp/bugs/stories/distribution/xx-distribution-upstream-bug-report.txt 2010-10-09 16:36:22 +0000
+++ lib/lp/bugs/stories/distribution/xx-distribution-upstream-bug-report.txt 2010-10-26 01:28:51 +0000
@@ -71,7 +71,7 @@
71broken percentage when comparing with bugs marked upstream. Perhaps71broken percentage when comparing with bugs marked upstream. Perhaps
72we'd solve this by separating the watched column into natively watched72we'd solve this by separating the watched column into natively watched
73and remote watched, but I don't know how to fix this right now. See73and remote watched, but I don't know how to fix this right now. See
74https://bugs.edge.launchpad.net/malone/+bug/18802074https://bugs.launchpad.net/malone/+bug/188020
75 -- kiko, 2008-02-0175 -- kiko, 2008-02-01
7676
7777
7878
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py 2010-10-03 15:30:06 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py 2010-10-26 01:28:51 +0000
@@ -77,7 +77,7 @@
77 'We\'re still working on source package recipes. '77 'We\'re still working on source package recipes. '
78 'We would love for you to try them out, and if you have '78 'We would love for you to try them out, and if you have '
79 'any issues, please '79 'any issues, please '
80 '<a href="http://bugs.edge.launchpad.net/launchpad-code">'80 '<a href="http://bugs.launchpad.net/launchpad-code">'
81 'file a bug</a>. We\'ll be happy to fix any problems you encounter.')81 'file a bug</a>. We\'ll be happy to fix any problems you encounter.')
8282
8383
8484
=== modified file 'lib/lp/code/model/tests/test_branchlookup.py'
--- lib/lp/code/model/tests/test_branchlookup.py 2010-09-28 21:27:42 +0000
+++ lib/lp/code/model/tests/test_branchlookup.py 2010-10-26 01:28:51 +0000
@@ -310,7 +310,7 @@
310 """test_getByURL works with production values."""310 """test_getByURL works with production values."""
311 branch_set = getUtility(IBranchLookup)311 branch_set = getUtility(IBranchLookup)
312 branch = self.makeProductBranch()312 branch = self.makeProductBranch()
313 self.pushConfig('codehosting', lp_url_hosts='edge,production,,')313 self.pushConfig('codehosting', lp_url_hosts='production,,')
314 branch2 = branch_set.getByUrl('lp://staging/~aa/b/c')314 branch2 = branch_set.getByUrl('lp://staging/~aa/b/c')
315 self.assertIs(None, branch2)315 self.assertIs(None, branch2)
316 branch2 = branch_set.getByUrl('lp://asdf/~aa/b/c')316 branch2 = branch_set.getByUrl('lp://asdf/~aa/b/c')
@@ -319,8 +319,6 @@
319 self.assertEqual(branch, branch2)319 self.assertEqual(branch, branch2)
320 branch2 = branch_set.getByUrl('lp://production/~aa/b/c')320 branch2 = branch_set.getByUrl('lp://production/~aa/b/c')
321 self.assertEqual(branch, branch2)321 self.assertEqual(branch, branch2)
322 branch2 = branch_set.getByUrl('lp://edge/~aa/b/c')
323 self.assertEqual(branch, branch2)
324322
325 def test_getByUrls(self):323 def test_getByUrls(self):
326 # getByUrls returns a dictionary mapping branches to URLs.324 # getByUrls returns a dictionary mapping branches to URLs.
327325
=== modified file 'lib/lp/registry/help/home-page-staging-help.html'
--- lib/lp/registry/help/home-page-staging-help.html 2010-01-12 16:16:27 +0000
+++ lib/lp/registry/help/home-page-staging-help.html 2010-10-26 01:28:51 +0000
@@ -18,8 +18,8 @@
18 <p>However, there are a few things to note about staging:</p>18 <p>However, there are a few things to note about staging:</p>
1919
20 <ul>20 <ul>
21 <li>Every 24 hours, staging's database is replaced with a fresh snapshot of Launchpad's production database: you will lose anything you do on staging.</li>21 <li>Every week, staging's database is replaced with a fresh snapshot of Launchpad's production database: you will lose anything you do on staging.</li>
22 <li>Staging runs the latest bleeding edge code from the Launchpad developers &mdash; if things go wrong, <a target="_blank" href="https://bugs.launchpad.net/launchpad/+filebug">please let us know</a>.</li>22 <li>Staging runs the latest code with changed database models from the Launchpad developers &mdash; if things go wrong, <a target="_blank" href="https://bugs.launchpad.net/launchpad/+filebug">please let us know</a>.</li>
23 <li>You can't create a new account on staging &mdash; instead, create one in <a href="https://launchpad.net/">Launchpad's production environment</a> and then wait up to 24 hours for your account to be available on staging.</li>23 <li>You can't create a new account on staging &mdash; instead, create one in <a href="https://launchpad.net/">Launchpad's production environment</a> and then wait up to 24 hours for your account to be available on staging.</li>
24 <li>Staging does not send email.</li>24 <li>Staging does not send email.</li>
25 <li>You can upload translations and templates but not export them &mdash; uploaded translations/templates will disappear after 24 hours.</li>25 <li>You can upload translations and templates but not export them &mdash; uploaded translations/templates will disappear after 24 hours.</li>
2626
=== modified file 'lib/lp/registry/interfaces/distributionsourcepackage.py'
--- lib/lp/registry/interfaces/distributionsourcepackage.py 2010-08-23 16:51:11 +0000
+++ lib/lp/registry/interfaces/distributionsourcepackage.py 2010-10-26 01:28:51 +0000
@@ -176,7 +176,7 @@
176 - The latest distroseries wins176 - The latest distroseries wins
177 - updates > security > release177 - updates > security > release
178178
179 See https://bugs.edge.launchpad.net/soyuz/+bug/236922 for a plan179 See https://bugs.launchpad.net/soyuz/+bug/236922 for a plan
180 on how this criteria will be centrally encoded.180 on how this criteria will be centrally encoded.
181 """)181 """)
182182
183183
=== modified file 'lib/lp/registry/model/distributionsourcepackage.py'
--- lib/lp/registry/model/distributionsourcepackage.py 2010-09-21 09:37:06 +0000
+++ lib/lp/registry/model/distributionsourcepackage.py 2010-10-26 01:28:51 +0000
@@ -235,7 +235,7 @@
235 # latest relevant publication. It relies on ordering of status235 # latest relevant publication. It relies on ordering of status
236 # and pocket enum values, which is arguably evil but much faster236 # and pocket enum values, which is arguably evil but much faster
237 # than CASE sorting; at any rate this can be fixed when237 # than CASE sorting; at any rate this can be fixed when
238 # https://bugs.edge.launchpad.net/soyuz/+bug/236922 is.238 # https://bugs.launchpad.net/soyuz/+bug/236922 is.
239 spph = SourcePackagePublishingHistory.selectFirst("""239 spph = SourcePackagePublishingHistory.selectFirst("""
240 SourcePackagePublishingHistory.distroseries = DistroSeries.id AND240 SourcePackagePublishingHistory.distroseries = DistroSeries.id AND
241 DistroSeries.distribution = %s AND241 DistroSeries.distribution = %s AND
242242
=== modified file 'lib/lp/registry/model/person.py'
--- lib/lp/registry/model/person.py 2010-10-24 12:46:23 +0000
+++ lib/lp/registry/model/person.py 2010-10-26 01:28:51 +0000
@@ -311,7 +311,7 @@
311 Note that it performs poorly at least some of the time, and if311 Note that it performs poorly at least some of the time, and if
312 EmailAddress and Person are already being queried, its probably better to312 EmailAddress and Person are already being queried, its probably better to
313 query Account directly. See bug313 query Account directly. See bug
314 https://bugs.edge.launchpad.net/launchpad-registry/+bug/615237 for some314 https://bugs.launchpad.net/launchpad-registry/+bug/615237 for some
315 corroborating information.315 corroborating information.
316 """316 """
317317
318318
=== modified file 'lib/lp/services/features/__init__.py'
--- lib/lp/services/features/__init__.py 2010-09-29 08:36:22 +0000
+++ lib/lp/services/features/__init__.py 2010-10-26 01:28:51 +0000
@@ -27,7 +27,7 @@
27Flags are defined by a I{name} that typically looks like a Python27Flags are defined by a I{name} that typically looks like a Python
28identifier, for example C{notification.global.text}. A definition is28identifier, for example C{notification.global.text}. A definition is
29given for a particular I{scope}, which also looks like a dotted identifier,29given for a particular I{scope}, which also looks like a dotted identifier,
30for example C{user.beta} or C{server.edge}. This is just a naming30for example C{user.beta} or C{server.lpnet}. This is just a naming
31convention, and they do not need to correspond to Python modules.31convention, and they do not need to correspond to Python modules.
3232
33The value is stored in the database as just a Unicode string, and it might33The value is stored in the database as just a Unicode string, and it might
3434
=== modified file 'lib/lp/services/features/webapp.py'
--- lib/lp/services/features/webapp.py 2010-09-25 09:27:30 +0000
+++ lib/lp/services/features/webapp.py 2010-10-26 01:28:51 +0000
@@ -25,7 +25,7 @@
2525
26 Currently supports the following scopes:26 Currently supports the following scopes:
27 - default27 - default
28 - is_edge/is_lpnet etc (thunks through to the config)28 - server.lpnet etc (thunks through to the config is_lpnet)
29 - pageid:29 - pageid:
30 This scope works on a namespace model: for a page30 This scope works on a namespace model: for a page
31 with pageid SomeType:+view#subselector31 with pageid SomeType:+view#subselector
3232
=== modified file 'lib/lp/services/mail/tests/incomingmail.txt'
--- lib/lp/services/mail/tests/incomingmail.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/services/mail/tests/incomingmail.txt 2010-10-26 01:28:51 +0000
@@ -119,7 +119,7 @@
119 Apologies for the inconvenience.119 Apologies for the inconvenience.
120 <BLANKLINE>120 <BLANKLINE>
121 If this is blocking your work, please file a question at121 If this is blocking your work, please file a question at
122 https://answers.edge.launchpad.net/launchpad/+addquestion122 https://answers.launchpad.net/launchpad/+addquestion
123 and include the error ID OOPS-... in the description.123 and include the error ID OOPS-... in the description.
124 ...124 ...
125 From: Sample Person <test@canonical.com>125 From: Sample Person <test@canonical.com>
@@ -256,7 +256,7 @@
256 Apologies for the inconvenience.256 Apologies for the inconvenience.
257 <BLANKLINE>257 <BLANKLINE>
258 If this is blocking your work, please file a question at258 If this is blocking your work, please file a question at
259 https://answers.edge.launchpad.net/launchpad/+addquestion259 https://answers.launchpad.net/launchpad/+addquestion
260 and include the error ID OOPS-...TEMAIL... in the description.260 and include the error ID OOPS-...TEMAIL... in the description.
261 ...261 ...
262 From: Foo Bar <foo.bar@canonical.com>262 From: Foo Bar <foo.bar@canonical.com>
@@ -301,7 +301,7 @@
301 Apologies for the inconvenience.301 Apologies for the inconvenience.
302 <BLANKLINE>302 <BLANKLINE>
303 If this is blocking your work, please file a question at303 If this is blocking your work, please file a question at
304 https://answers.edge.launchpad.net/launchpad/+addquestion304 https://answers.launchpad.net/launchpad/+addquestion
305 and include the error ID OOPS-...TEMAIL... in the description.305 and include the error ID OOPS-...TEMAIL... in the description.
306 ...306 ...
307 From: Foo Bar <foo.bar@canonical.com>307 From: Foo Bar <foo.bar@canonical.com>
308308
=== modified file 'lib/lp/services/memcache/doc/tales-cache.txt'
--- lib/lp/services/memcache/doc/tales-cache.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/services/memcache/doc/tales-cache.txt 2010-10-26 01:28:51 +0000
@@ -32,8 +32,7 @@
3232
33We also see some comments showing that we had a cache hit, and what the33We also see some comments showing that we had a cache hit, and what the
34configuration was for it ("public"). These comments are only present34configuration was for it ("public"). These comments are only present
35when Launchpad's config is not configured as edge or production (``is_edge``35when Launchpad's config is not configured as production (``is_lpnet``).
36or ``is_lpnet``, respectively).
3736
38If we clear the cache, it will be rendered as expected.37If we clear the cache, it will be rendered as expected.
3938
4039
=== modified file 'lib/lp/services/memcache/tales.py'
--- lib/lp/services/memcache/tales.py 2010-09-12 05:52:41 +0000
+++ lib/lp/services/memcache/tales.py 2010-10-26 01:28:51 +0000
@@ -274,7 +274,7 @@
274 self._memcache_expr = memcache_expr274 self._memcache_expr = memcache_expr
275275
276 def __call__(self, value):276 def __call__(self, value):
277 if not config.launchpad.is_lpnet and not config.launchpad.is_edge:277 if not config.launchpad.is_lpnet:
278 # For debugging and testing purposes, prepend a description of278 # For debugging and testing purposes, prepend a description of
279 # the memcache expression used to the stored value.279 # the memcache expression used to the stored value.
280 rule = '%s [%s seconds]' % (self._memcache_expr, self._max_age)280 rule = '%s [%s seconds]' % (self._memcache_expr, self._max_age)
281281
=== modified file 'lib/lp/testing/__init__.py'
--- lib/lp/testing/__init__.py 2010-10-19 23:04:18 +0000
+++ lib/lp/testing/__init__.py 2010-10-26 01:28:51 +0000
@@ -90,7 +90,7 @@
90import transaction90import transaction
91# zope.exception demands more of frame objects than twisted.python.failure91# zope.exception demands more of frame objects than twisted.python.failure
92# provides in its fake frames. This is enough to make it work with them92# provides in its fake frames. This is enough to make it work with them
93# as of 2009-09-16. See https://bugs.edge.launchpad.net/bugs/425113.93# as of 2009-09-16. See https://bugs.launchpad.net/bugs/425113.
94from twisted.python.failure import _Frame94from twisted.python.failure import _Frame
95from windmill.authoring import WindmillTestClient95from windmill.authoring import WindmillTestClient
96from zope.component import (96from zope.component import (
9797
=== modified file 'lib/lp/translations/templates/translationimportqueue-index.pt'
--- lib/lp/translations/templates/translationimportqueue-index.pt 2010-01-12 13:48:24 +0000
+++ lib/lp/translations/templates/translationimportqueue-index.pt 2010-10-26 01:28:51 +0000
@@ -25,7 +25,7 @@
25 </p>25 </p>
26 <p>26 <p>
27 If your import is taking longer than you'd expect, <a href="27 If your import is taking longer than you'd expect, <a href="
28 https://answers.edge.launchpad.net/rosetta/+addquestion"28 https://answers.launchpad.net/rosetta/+addquestion"
29 >contact us</a>.29 >contact us</a>.
30 (<a href="/+help/successful-imports.html" target="help">Learn30 (<a href="/+help/successful-imports.html" target="help">Learn
31 more about getting a successful import</a>)31 more about getting a successful import</a>)
3232
=== modified file 'utilities/on-edge'
--- utilities/on-edge 2010-04-27 19:48:39 +0000
+++ utilities/on-edge 2010-10-26 01:28:51 +0000
@@ -118,30 +118,24 @@
118 parser.add_option(118 parser.add_option(
119 '-v', '--verbose', action='store_true', help="Show revision log.")119 '-v', '--verbose', action='store_true', help="Show revision log.")
120 parser.add_option(120 parser.add_option(
121 '--edge-only', action='store_true',121 '--edge', action='store_true',
122 help="Only show revisions not on edge. Do not consult staging.")122 help="Show revisions on edge.")
123 parser.add_option(
124 '--staging-only', action='store_true',
125 help="Only show revisions not on staging. Do not consult edge.")
126 return parser123 return parser
127124
128125
129def run(verbose, edge_only, staging_only):126def run(verbose, edge):
130 if edge_only and staging_only:
131 raise UsageError("Cannot show only edge and only staging.")
132 parent_dir = get_parent_directory()127 parent_dir = get_parent_directory()
133 if not staging_only:128 if edge:
134 edge_revision = get_edge_revision()129 edge_revision = get_edge_revision()
135 stable_branch = os.path.join(parent_dir, 'stable')130 stable_branch = os.path.join(parent_dir, 'stable')
136 report_difference_to_server(131 report_difference_to_server(
137 'edge', stable_branch, edge_revision, verbose)132 'edge', stable_branch, edge_revision, verbose)
138 if not edge_only:133 staging_revision = get_staging_revision()
139 staging_revision = get_staging_revision()134 db_stable_branch = os.path.join(parent_dir, 'db-stable')
140 db_stable_branch = os.path.join(parent_dir, 'db-stable')135 report_difference_to_server(
141 report_difference_to_server(136 'staging', db_stable_branch, staging_revision, verbose)
142 'staging', db_stable_branch, staging_revision, verbose)137 print "Last automatic merge on db-stable r%s was stable r%s." % (
143 print "Last automatic merge on db-stable r%s was stable r%s." % (138 get_last_automatic_stable_merge_revno(db_stable_branch))
144 get_last_automatic_stable_merge_revno(db_stable_branch))
145139
146140
147def main(argv):141def main(argv):
@@ -149,7 +143,7 @@
149 options, args = parser.parse_args(argv)143 options, args = parser.parse_args(argv)
150 if args:144 if args:
151 raise UsageError("Don't know what to do with arguments: %s" % args)145 raise UsageError("Don't know what to do with arguments: %s" % args)
152 run(options.verbose, options.edge_only, options.staging_only)146 run(options.verbose, options.edge)
153147
154148
155if __name__ == '__main__':149if __name__ == '__main__':
156150
=== modified file 'utilities/page-performance-report-daily.sh'
--- utilities/page-performance-report-daily.sh 2010-08-11 16:25:05 +0000
+++ utilities/page-performance-report-daily.sh 2010-10-26 01:28:51 +0000
@@ -39,7 +39,6 @@
39 }39 }
4040
41report() {41report() {
42 category_report $* edge /srv/launchpad.net-logs/edge
43 category_report $* lpnet /srv/launchpad.net-logs/production42 category_report $* lpnet /srv/launchpad.net-logs/production
44 return 043 return 0
45}44}
4645
=== modified file 'utilities/page-performance-report.ini'
--- utilities/page-performance-report.ini 2010-08-11 11:53:39 +0000
+++ utilities/page-performance-report.ini 2010-10-26 01:28:51 +0000
@@ -5,13 +5,13 @@
5All Launchpad=.5All Launchpad=.
6All launchpad except opstats=(?<!\+opstats)$6All launchpad except opstats=(?<!\+opstats)$
77
8Launchpad Frontpage=^https?://(edge\.)?launchpad\.[^/]+/?$8Launchpad Frontpage=^https?://launchpad\.[^/]+/?$
99
10# Note that the bug text dump is served on the main launchpad domain10# Note that the bug text dump is served on the main launchpad domain
11# and we need to exlude it from the registry stats.11# and we need to exlude it from the registry stats.
12Registry=^https?://(edge\.)?launchpad\.(?<!/\+text)$12Registry=^https?://launchpad\.(?<!/\+text)$
13Registry - Person Index=^https?://(edge\.)?launchpad\.[^/]+/(~|%7E)[^/]+$13Registry - Person Index=^https?://launchpad\.[^/]+/(~|%7E)[^/]+$
14Registry - Pillar Index=^https?://(edge\.)?launchpad\.[^/]+/\w[^/]*$14Registry - Pillar Index=^https?://launchpad\.[^/]+/\w[^/]*$
1515
16Answers=^https?://answers\.16Answers=^https?://answers\.
17Answers - Front page=^https?://answers\.[^/]+/?$17Answers - Front page=^https?://answers\.[^/]+/?$
@@ -27,7 +27,7 @@
27Bugs - Bug Page=^https?://bugs\.[^/]+/.+/\+bug/\d+$27Bugs - Bug Page=^https?://bugs\.[^/]+/.+/\+bug/\d+$
28Bugs - Pillar Index=^https?://bugs\.[^/]+/\w[^/]*$28Bugs - Pillar Index=^https?://bugs\.[^/]+/\w[^/]*$
29Bugs - Search=^https?://bugs\.[^/]+/.+/\+bugs\?.*field.searchtext=29Bugs - Search=^https?://bugs\.[^/]+/.+/\+bugs\?.*field.searchtext=
30Bugs - Text Dump=^https?://(edge\.)?launchpad\..+/\+text$30Bugs - Text Dump=^https?://launchpad\..+/\+text$
3131
32Code=^https?://code\.32Code=^https?://code\.
33Code - Front page=^https?://code\.[^/]+/?$33Code - Front page=^https?://code\.[^/]+/?$
3434
=== modified file 'utilities/rocketfuel-get'
--- utilities/rocketfuel-get 2009-09-11 05:01:06 +0000
+++ utilities/rocketfuel-get 2010-10-26 01:28:51 +0000
@@ -61,7 +61,7 @@
61echo ""61echo ""
62echo " ALSO NOTE: You can ignore any warnings you see below about how"62echo " ALSO NOTE: You can ignore any warnings you see below about how"
63echo " 'You have not informed bzr of your Launchpad ID ...' etc."63echo " 'You have not informed bzr of your Launchpad ID ...' etc."
64echo " See https://bugs.edge.launchpad.net/bzr/+bug/401617 for why."64echo " See https://bugs.launchpad.net/bzr/+bug/401617 for why."
65echo ""65echo ""
66echo " Sourcedeps: $LP_SOURCEDEPS_PATH"66echo " Sourcedeps: $LP_SOURCEDEPS_PATH"
6767
6868
=== modified file 'utilities/rocketfuel-mp-status'
--- utilities/rocketfuel-mp-status 2010-09-16 00:58:27 +0000
+++ utilities/rocketfuel-mp-status 2010-10-26 01:28:51 +0000
@@ -6,7 +6,7 @@
6import os6import os
7import sys7import sys
88
9launchpad = Launchpad.login_with('rocketfuel-mp-status', 'edge')9launchpad = Launchpad.login_with('rocketfuel-mp-status', 'production')
10trunk = commands.getoutput(10trunk = commands.getoutput(
11 '. ~/.rocketfuel-env.sh && echo $LP_TRUNK_NAME')11 '. ~/.rocketfuel-env.sh && echo $LP_TRUNK_NAME')
12projpath = commands.getoutput(12projpath = commands.getoutput(