Merge lp:~deryck/launchpad/rockstar-js-refresh into lp:launchpad

Proposed by Deryck Hodge
Status: Merged
Approved by: Deryck Hodge
Approved revision: no longer in the source branch.
Merged at revision: 12012
Proposed branch: lp:~deryck/launchpad/rockstar-js-refresh
Merge into: lp:launchpad
Prerequisite: lp:~rockstar/launchpad/javascript-refresh
Diff against target: 1680 lines (+555/-140)
65 files modified
buildout-templates/bin/test.in (+1/-1)
lib/canonical/launchpad/doc/lazr-js-widgets.txt (+6/-6)
lib/canonical/launchpad/doc/location-widget.txt (+1/-1)
lib/canonical/launchpad/javascript/client/client.js (+7/-2)
lib/canonical/launchpad/windmill/jstests/initialize.js (+6/-1)
lib/canonical/launchpad/windmill/testing/widgets.py (+13/-13)
lib/canonical/widgets/lazrjs.py (+3/-3)
lib/canonical/widgets/location.py (+1/-1)
lib/canonical/widgets/templates/inline-picker.pt (+4/-4)
lib/canonical/widgets/templates/license.pt (+1/-1)
lib/canonical/widgets/templates/vocabulary-picker.js.template (+1/-1)
lib/lp/app/browser/tests/base-layout.txt (+2/-2)
lib/lp/app/browser/tests/test_base_layout.py (+4/-4)
lib/lp/app/configure.zcml (+14/-0)
lib/lp/app/javascript/lp-mochi.js (+1/-1)
lib/lp/app/javascript/lp.js (+2/-2)
lib/lp/app/javascript/picker.js (+3/-3)
lib/lp/app/javascript/tests/test_lp_collapsibles.html (+1/-1)
lib/lp/app/javascript/tests/test_lp_collapsibles.js (+2/-1)
lib/lp/app/templates/base-layout-macros.pt (+10/-1)
lib/lp/app/templates/base-layout.pt (+1/-1)
lib/lp/app/templates/launchpad-widget-macros.pt (+1/-1)
lib/lp/bugs/browser/bugalsoaffects.py (+1/-1)
lib/lp/bugs/javascript/bugtask_index.js (+2/-2)
lib/lp/bugs/javascript/official_bug_tags.js (+1/-1)
lib/lp/bugs/javascript/tests/test_bug_subscription_widget.html (+1/-1)
lib/lp/bugs/javascript/tests/test_bug_subscription_widget.js (+2/-1)
lib/lp/bugs/javascript/tests/test_me_too.html (+1/-1)
lib/lp/bugs/javascript/tests/test_me_too.js (+2/-17)
lib/lp/bugs/javascript/tests/test_subscriber.html (+1/-1)
lib/lp/bugs/javascript/tests/test_subscriber.js (+1/-1)
lib/lp/bugs/templates/bugtarget-patches.pt (+2/-2)
lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt (+6/-6)
lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py (+2/-1)
lib/lp/bugs/windmill/tests/test_mark_duplicate.py (+19/-7)
lib/lp/bugs/windmill/tests/test_official_bug_tags_management.py (+12/-8)
lib/lp/code/interfaces/branchmergequeue.py (+129/-0)
lib/lp/code/javascript/branchmergeproposal.diff.js (+2/-2)
lib/lp/code/javascript/tests/test_productseries-setbranch.html (+2/-2)
lib/lp/code/javascript/tests/test_productseries_setbranch.js (+1/-1)
lib/lp/code/model/branchmergequeue.py (+88/-0)
lib/lp/code/model/tests/test_branchmergequeue.py (+155/-0)
lib/lp/code/windmill/tests/test_branch_popupdiff.py (+1/-0)
lib/lp/code/windmill/tests/test_branchmergeproposal_review.py (+2/-0)
lib/lp/registry/browser/__init__.py (+1/-1)
lib/lp/registry/browser/person.py (+1/-1)
lib/lp/registry/browser/team.py (+2/-2)
lib/lp/registry/browser/tests/productseries-views.txt (+1/-1)
lib/lp/registry/javascript/tests/test_milestone_table.html (+1/-1)
lib/lp/registry/javascript/tests/test_milestone_table.js (+1/-1)
lib/lp/registry/javascript/tests/timeline-iframe.html (+1/-1)
lib/lp/registry/javascript/tests/timeline.js (+6/-5)
lib/lp/registry/templates/distributionsourcepackage-index.pt (+1/-4)
lib/lp/registry/templates/product-index.pt (+1/-1)
lib/lp/registry/templates/productseries-setbranch.pt (+1/-1)
lib/lp/registry/templates/team-portlet-membership.pt (+1/-1)
lib/lp/soyuz/javascript/tests/archivesubscribers_index.js (+2/-1)
lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js (+2/-1)
lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html (+1/-1)
lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html (+1/-1)
lib/lp/soyuz/templates/archive-index.pt (+1/-4)
lib/lp/testing/__init__.py (+4/-3)
lib/lp/translations/templates/languageset-index.pt (+1/-1)
utilities/yui-deps.py (+6/-1)
versions.cfg (+1/-1)
To merge this branch: bzr merge lp:~deryck/launchpad/rockstar-js-refresh
Reviewer Review Type Date Requested Status
Deryck Hodge (community) Approve
Review via email: mp+40329@code.launchpad.net

Commit message

[r=deryck][ui=none][bug=514190,672576] Update lazr-js to 1.5DEV-r188.

Description of the change

This is my attempt to get rockstar's javascript-refresh branch ready to land. It basically amounts to a bunch of sed's for yui to yui3 and a couple test fixes that were fragile. Since rockstar's branch (see pre-req branch) has already been approved, I'm going to land this unreviewed.

I've done a lot of manual testing, besides several ec2 runs, and I will create a bug to track QA on this change, since we will need to manually check out qastaging pretty heavily before approving this to deploy.

To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'buildout-templates/bin/test.in'
2--- buildout-templates/bin/test.in 2010-10-15 04:53:38 +0000
3+++ buildout-templates/bin/test.in 2010-12-01 21:32:51 +0000
4@@ -169,7 +169,7 @@
5 'tests_pattern': '^f?tests$',
6 'test_path': [${buildout:directory/lib|path-repr}],
7 'package': ['canonical', 'lp', 'devscripts', 'launchpad_loggerhead'],
8- 'layer': ['!(MailmanLayer)'],
9+ 'layer': ['!(MailmanLayer|WindmillLayer)'],
10 }
11
12 # Monkey-patch os.listdir to randomise the results
13
14=== modified file 'lib/canonical/launchpad/doc/lazr-js-widgets.txt'
15--- lib/canonical/launchpad/doc/lazr-js-widgets.txt 2010-10-18 22:24:59 +0000
16+++ lib/canonical/launchpad/doc/lazr-js-widgets.txt 2010-12-01 21:32:51 +0000
17@@ -25,7 +25,7 @@
18 content.
19
20 >>> print widget()
21- <h1 id="..."><span class="yui-editable_text-text">My bug is &gt;
22+ <h1 id="..."><span class="yui3-editable_text-text">My bug is &gt;
23 important</span>
24 </h1>
25
26@@ -35,10 +35,10 @@
27
28 >>> login('no-priv@canonical.com')
29 >>> print widget()
30- <h1 id="..."><span class="yui-editable_text-text">My bug is &gt;
31+ <h1 id="..."><span class="yui3-editable_text-text">My bug is &gt;
32 important</span>
33 <a href="http://bugs.launchpad.dev/.../+edit"
34- class="yui-editable_text-trigger sprite edit"
35+ class="yui3-editable_text-trigger sprite edit"
36 ></a>
37 </h1>
38 <script>
39@@ -53,7 +53,7 @@
40 ... id="bug-title", title="Edit this summary")
41 >>> print widget()
42 <h1 id="bug-title">...
43- ...class="yui-editable_text-trigger sprite edit"...
44+ ...class="yui3-editable_text-trigger sprite edit"...
45
46 The initial_value_override parameter is passed as a JSON-serialized value.
47
48@@ -107,7 +107,7 @@
49 False
50 >>> print widget()
51 <span id="inline-picker-activator-id-...">...
52- <div class="yui-activator-message-box yui-activator-hidden" />
53+ <div class="yui3-activator-message-box yui3-activator-hidden" />
54 </span>
55
56 The foo.bar user can see the activator's edit button.
57@@ -118,7 +118,7 @@
58 True
59 >>> print widget()
60 <span id="inline-picker-activator-id-...">
61- ...<div class="yui-activator-message-box yui-activator-hidden" />
62+ ...<div class="yui3-activator-message-box yui3-activator-hidden" />
63 </span>
64 ...Y.lp.app.picker.addPickerPatcher(...
65
66
67=== modified file 'lib/canonical/launchpad/doc/location-widget.txt'
68--- lib/canonical/launchpad/doc/location-widget.txt 2010-10-18 22:24:59 +0000
69+++ lib/canonical/launchpad/doc/location-widget.txt 2010-12-01 21:32:51 +0000
70@@ -173,7 +173,7 @@
71 >>> print widget.map_javascript
72 <BLANKLINE>
73 <script type="text/javascript">
74- YUI().use('node', 'lp.app.mapping', function(Y) {
75+ LPS.use('node', 'lp.app.mapping', function(Y) {
76 function renderMap() {
77 Y.lp.app.mapping.renderPersonMap(
78 52.2, 0.3, "Colin Watson",
79
80=== modified file 'lib/canonical/launchpad/javascript/client/client.js'
81--- lib/canonical/launchpad/javascript/client/client.js 2010-11-22 21:26:11 +0000
82+++ lib/canonical/launchpad/javascript/client/client.js 2010-12-01 21:32:51 +0000
83@@ -5,7 +5,12 @@
84 LP.client.links = (typeof LP.links !== "undefined") ? LP.client.links : {};
85 LP.client.cache = (typeof LP.objects !== "undefined") ? LP.client.cache : {};
86
87-YUI().use("attribute", "io-base", "json-parse", "json-stringify", function(Y) {
88+YUI({
89+ bootstrap: false,
90+ fetchCSS: false,
91+ combine: false,
92+ timeout: 50
93+}).use("attribute", "io-base", "json-parse", "json-stringify", function(Y) {
94
95 LP.client.HTTP_CREATED = 201;
96 LP.client.HTTP_SEE_ALSO = 303;
97@@ -525,7 +530,7 @@
98 };
99 });
100
101-YUI().add('lp.client.plugins', function (Y) {
102+YUI.add('lp.client.plugins', function (Y) {
103
104 /**
105 * A collection of plugins to hook LP.client into widgets.
106
107=== modified file 'lib/canonical/launchpad/windmill/jstests/initialize.js'
108--- lib/canonical/launchpad/windmill/jstests/initialize.js 2009-06-30 21:06:27 +0000
109+++ lib/canonical/launchpad/windmill/jstests/initialize.js 2010-12-01 21:32:51 +0000
110@@ -42,7 +42,12 @@
111
112
113 /* The YUI instance used by SynchronizedTest. */
114-SynchronizedTest.prototype.Y = YUI().use('dump');
115+SynchronizedTest.prototype.Y = YUI({
116+ bootstrap: false,
117+ fetchCSS: false,
118+ combine: false,
119+ timeout: 50
120+ }).use('dump');
121
122 /* Create the synchronization node, that should make the wait() caller
123 * return.
124
125=== modified file 'lib/canonical/launchpad/windmill/testing/widgets.py'
126--- lib/canonical/launchpad/windmill/testing/widgets.py 2010-11-07 18:37:37 +0000
127+++ lib/canonical/launchpad/windmill/testing/widgets.py 2010-12-01 21:32:51 +0000
128@@ -33,7 +33,7 @@
129 """Constructor.
130
131 :param client: A WindmillTestClient instance for interacting with pages.
132- :param widget_name: The class name of the YUI widget, like 'yui-picker'.
133+ :param widget_name: The class name of the YUI widget, like 'yui3-picker'.
134 """
135 self.client = client
136 self.widget_name = widget_name
137@@ -76,22 +76,22 @@
138
139
140 class SearchPickerWidget(OnPageWidget):
141- """A proxy for the yui-picker widget from lazr-js."""
142+ """A proxy for the yui3-picker widget from lazr-js."""
143
144 def __init__(self, client):
145 """Constructor.
146
147 :param client: A WindmillTestClient instance.
148 """
149- super(SearchPickerWidget, self).__init__(client, 'yui-picker')
150+ super(SearchPickerWidget, self).__init__(client, 'yui3-picker')
151 self.search_input_xpath = (
152- self.xpath + "//input[@class='yui-picker-search']")
153+ self.xpath + "//input[@class='yui3-picker-search']")
154 self.search_button_xpath = (
155- self.xpath + "//div[@class='yui-picker-search-box']/button")
156+ self.xpath + "//div[@class='yui3-picker-search-box']/button")
157
158 def _get_result_xpath_by_number(self, item_number):
159 """Return the XPath for the given search result number."""
160- item_xpath = "//ul[@class='yui-picker-results']/li[%d]/span" % item_number
161+ item_xpath = "//ul[@class='yui3-picker-results']/li[%d]/span" % item_number
162 return self.xpath + item_xpath
163
164 def do_search(self, text):
165@@ -234,7 +234,7 @@
166 # Click on edit button.
167 button_xpath = (
168 u"//span[@id='%s']"
169- "/button[not(contains(@class, 'yui-activator-hidden'))]"
170+ "/button[not(contains(@class, 'yui3-activator-hidden'))]"
171 % self.activator_id)
172 client.waits.forElement(
173 xpath=button_xpath,
174@@ -303,15 +303,15 @@
175 # Click on edit button.
176 button_xpath = (
177 u"//span[@id='%s']"
178- "/button[not(contains(@class, 'yui-activator-hidden'))]"
179+ "/button[not(contains(@class, 'yui3-activator-hidden'))]"
180 % self.activator_id)
181 client.waits.forElement(xpath=button_xpath, timeout=u'25000')
182 client.click(xpath=button_xpath)
183
184 # Click on remove button.
185 remove_button_xpath = (
186- u"//div[contains(@class, 'yui-picker ') "
187- "and not(contains(@class, 'yui-picker-hidden'))]"
188+ u"//div[contains(@class, 'yui3-picker ') "
189+ "and not(contains(@class, 'yui3-picker-hidden'))]"
190 "//*[contains(@class, '%s')]" % self.button_class)
191 client.waits.forElement(xpath=remove_button_xpath, timeout=u'25000')
192 client.click(xpath=remove_button_xpath)
193@@ -319,7 +319,7 @@
194
195 # Verify removal.
196 client.asserts.assertText(
197- xpath=u"//span[@id='%s']/span[@class='yui-activator-data-box']"
198+ xpath=u"//span[@id='%s']/span[@class='yui3-activator-data-box']"
199 % self.activator_id,
200 validator=self.new_value)
201
202@@ -329,11 +329,11 @@
203
204 # Verify removal, again.
205 client.waits.forElement(
206- xpath=u"//span[@id='%s']/span[@class='yui-activator-data-box']"
207+ xpath=u"//span[@id='%s']/span[@class='yui3-activator-data-box']"
208 % self.activator_id,
209 timeout=u'25000')
210 client.asserts.assertText(
211- xpath=u"//span[@id='%s']/span[@class='yui-activator-data-box']"
212+ xpath=u"//span[@id='%s']/span[@class='yui3-activator-data-box']"
213 % self.activator_id,
214 validator=self.new_value)
215
216
217=== modified file 'lib/canonical/widgets/lazrjs.py'
218--- lib/canonical/widgets/lazrjs.py 2010-09-24 18:10:31 +0000
219+++ lib/canonical/widgets/lazrjs.py 2010-12-01 21:32:51 +0000
220@@ -47,7 +47,7 @@
221 # value: the current field value
222 WIDGET_TEMPLATE = dedent(u"""\
223 <%(tag)s id="%(id)s"><span
224- class="yui-editable_text-text">%(value)s</span>
225+ class="yui3-editable_text-text">%(value)s</span>
226 %(trigger)s
227 </%(tag)s>
228 %(activation_script)s
229@@ -55,7 +55,7 @@
230
231 # Template for the trigger button.
232 TRIGGER_TEMPLATE = dedent(u"""\
233- <a href="%(edit_url)s" class="yui-editable_text-trigger sprite edit"
234+ <a href="%(edit_url)s" class="yui3-editable_text-trigger sprite edit"
235 ></a>
236 """)
237
238@@ -185,7 +185,7 @@
239 %(edit_controls)s
240 <h2>%(title)s</h2>
241 </div>
242- <div class="yui-editable_text-text">%(value)s</div>
243+ <div class="yui3-editable_text-text">%(value)s</div>
244 </div>
245 %(activation_script)s
246 """)
247
248=== modified file 'lib/canonical/widgets/location.py'
249--- lib/canonical/widgets/location.py 2010-09-27 16:49:22 +0000
250+++ lib/canonical/widgets/location.py 2010-12-01 21:32:51 +0000
251@@ -130,7 +130,7 @@
252 show_marker=self.show_marker)
253 return """
254 <script type="text/javascript">
255- YUI().use('node', 'lp.app.mapping', function(Y) {
256+ LPS.use('node', 'lp.app.mapping', function(Y) {
257 function renderMap() {
258 Y.lp.app.mapping.renderPersonMap(
259 %(center_lat)s, %(center_lng)s, %(displayname)s,
260
261=== modified file 'lib/canonical/widgets/templates/inline-picker.pt'
262--- lib/canonical/widgets/templates/inline-picker.pt 2010-07-15 10:59:22 +0000
263+++ lib/canonical/widgets/templates/inline-picker.pt 2010-12-01 21:32:51 +0000
264@@ -1,15 +1,15 @@
265 <span tal:attributes="id view/id">
266- <span class="yui-activator-data-box">
267+ <span class="yui3-activator-data-box">
268 <tal:attribute replace="structure view/default_html"/>
269 </span>
270- <button class="lazr-btn yui-activator-act yui-activator-hidden">
271+ <button class="lazr-btn yui3-activator-act yui3-activator-hidden">
272 Edit
273 </button>
274- <div class="yui-activator-message-box yui-activator-hidden"/>
275+ <div class="yui3-activator-message-box yui3-activator-hidden"/>
276 </span>
277 <script tal:condition="view/can_write"
278 tal:content="structure string:
279-YUI().use('lp.app.picker', function(Y) {
280+LPS.use('lp.app.picker', function(Y) {
281 if (Y.UA.ie) {
282 return;
283 }
284
285=== modified file 'lib/canonical/widgets/templates/license.pt'
286--- lib/canonical/widgets/templates/license.pt 2010-09-25 21:42:09 +0000
287+++ lib/canonical/widgets/templates/license.pt 2010-12-01 21:32:51 +0000
288@@ -21,7 +21,7 @@
289 </script>
290 <script type="text/javascript">
291 //<![CDATA[
292-YUI().use('node', 'lazr.effects', function(Y) {
293+LPS.use('node', 'lazr.effects', function(Y) {
294 Y.on('domready', function() {
295 function make_slider(cfg) {
296 var table_name = '#' + cfg.which;
297
298=== modified file 'lib/canonical/widgets/templates/vocabulary-picker.js.template'
299--- lib/canonical/widgets/templates/vocabulary-picker.js.template 2010-07-15 10:59:22 +0000
300+++ lib/canonical/widgets/templates/vocabulary-picker.js.template 2010-12-01 21:32:51 +0000
301@@ -1,4 +1,4 @@
302-YUI().use('node', 'lp.app.picker', 'plugin', function(Y) {
303+LPS.use('node', 'lp.app.picker', 'plugin', function(Y) {
304 if (Y.UA.ie) {
305 return;
306 }
307
308=== modified file 'lib/lp/app/browser/tests/base-layout.txt'
309--- lib/lp/app/browser/tests/base-layout.txt 2010-10-26 01:26:00 +0000
310+++ lib/lp/app/browser/tests/base-layout.txt 2010-12-01 21:32:51 +0000
311@@ -219,7 +219,7 @@
312 >>> view = LocationlessView(team, request)
313 >>> body = find_tag_by_id(view.render(), 'document')
314 >>> print body['class']
315- tab-overview locationless private yui-skin-sam
316+ tab-overview locationless private yui3-skin-sam
317
318 When the context is public, the 'public' class is in the class attribute.
319
320@@ -228,7 +228,7 @@
321 >>> view = LocationlessView(team, request)
322 >>> body = find_tag_by_id(view.render(), 'document')
323 >>> print body['class']
324- tab-overview locationless public yui-skin-sam
325+ tab-overview locationless public yui3-skin-sam
326
327
328 Notifications
329
330=== modified file 'lib/lp/app/browser/tests/test_base_layout.py'
331--- lib/lp/app/browser/tests/test_base_layout.py 2010-09-29 03:26:01 +0000
332+++ lib/lp/app/browser/tests/test_base_layout.py 2010-12-01 21:32:51 +0000
333@@ -106,7 +106,7 @@
334 self.verify_base_layout_head_parts(view, content)
335 document = find_tag_by_id(content, 'document')
336 self.verify_base_layout_body_parts(document)
337- classes = 'tab-overview main_side public yui-skin-sam'.split()
338+ classes = 'tab-overview main_side public yui3-skin-sam'.split()
339 self.assertEqual(classes, document['class'].split())
340 self.verify_watermark(document)
341 self.assertEqual(
342@@ -121,7 +121,7 @@
343 self.verify_base_layout_head_parts(view, content)
344 document = find_tag_by_id(content, 'document')
345 self.verify_base_layout_body_parts(document)
346- classes = 'tab-overview main_only public yui-skin-sam'.split()
347+ classes = 'tab-overview main_only public yui3-skin-sam'.split()
348 self.assertEqual(classes, document['class'].split())
349 self.verify_watermark(document)
350 self.assertEqual(
351@@ -138,7 +138,7 @@
352 document = find_tag_by_id(content, 'document')
353 self.verify_base_layout_body_parts(document)
354 self.verify_watermark(document)
355- classes = 'tab-overview searchless public yui-skin-sam'.split()
356+ classes = 'tab-overview searchless public yui3-skin-sam'.split()
357 self.assertEqual(classes, document['class'].split())
358 self.assertEqual(
359 'registering', document.find(True, id='registration')['class'])
360@@ -153,7 +153,7 @@
361 self.verify_base_layout_head_parts(view, content)
362 document = find_tag_by_id(content, 'document')
363 self.verify_base_layout_body_parts(document)
364- classes = 'tab-overview locationless public yui-skin-sam'.split()
365+ classes = 'tab-overview locationless public yui3-skin-sam'.split()
366 self.assertEqual(classes, document['class'].split())
367 self.assertEqual(None, document.find(True, id='registration'))
368 self.assertEqual(None, document.find(True, id='watermark'))
369
370=== added file 'lib/lp/app/configure.zcml'
371--- lib/lp/app/configure.zcml 1970-01-01 00:00:00 +0000
372+++ lib/lp/app/configure.zcml 2010-09-29 12:39:28 +0000
373@@ -0,0 +1,14 @@
374+<!-- Copyright 2009 Canonical Ltd. This software is licensed under the
375+ GNU Affero General Public License version 3 (see the file LICENSE).
376+-->
377+
378+<configure
379+ xmlns="http://namespaces.zope.org/zope"
380+ xmlns:browser="http://namespaces.zope.org/browser"
381+ xmlns:i18n="http://namespaces.zope.org/i18n"
382+ xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
383+ xmlns:lp="http://namespaces.canonical.com/lp"
384+ i18n_domain="launchpad">
385+ <include
386+ package=".browser"/>
387+</configure>
388
389=== modified file 'lib/lp/app/javascript/lp-mochi.js'
390--- lib/lp/app/javascript/lp-mochi.js 2010-01-21 21:03:05 +0000
391+++ lib/lp/app/javascript/lp-mochi.js 2010-12-01 21:32:51 +0000
392@@ -359,7 +359,7 @@
393 }
394
395 function connectRemoteCommentReply(comment_index) {
396- YUI().use('event', function(Y) {
397+ LPS.use('event', function(Y) {
398 var toggleFunc = function() {
399 toggleRemoteCommentReply(comment_index);
400 return false;
401
402=== modified file 'lib/lp/app/javascript/lp.js'
403--- lib/lp/app/javascript/lp.js 2010-10-27 15:18:56 +0000
404+++ lib/lp/app/javascript/lp.js 2010-12-01 21:32:51 +0000
405@@ -244,7 +244,7 @@
406 // registers a function to fire onload.
407 // Use this for initilaizing any javascript that should fire once the page
408 // has been loaded.
409- YUI().use('node', function(Y) {
410+ LPS.use('node', function(Y) {
411 Y.on('load', function(e) {
412 func();
413 }, window);
414@@ -311,7 +311,7 @@
415 node.focus();
416 }
417 } catch (e) {
418- YUI().use('console', function(Y) {
419+ LPS.use('console', function(Y) {
420 Y.log('In setFocusByName(<' +
421 node.tagName + ' type=' + node.type + '>): ' + e);
422 });
423
424=== modified file 'lib/lp/app/javascript/picker.js'
425--- lib/lp/app/javascript/picker.js 2010-07-15 10:59:22 +0000
426+++ lib/lp/app/javascript/picker.js 2010-12-01 21:32:51 +0000
427@@ -56,7 +56,7 @@
428 };
429
430 var show_hide_buttons = function () {
431- var link = content_box.one('.yui-activator-data-box a');
432+ var link = content_box.one('.yui3-activator-data-box a');
433 if (remove_button) {
434 if (link === null || !show_remove_button) {
435 remove_button.addClass('yui-picker-hidden');
436@@ -223,8 +223,8 @@
437
438 var new_config = Y.merge(config, {
439 align: {
440- points: [Y.WidgetPositionExt.CC,
441- Y.WidgetPositionExt.CC]
442+ points: [Y.WidgetPositionAlign.CC,
443+ Y.WidgetPositionAlign.CC]
444 },
445 progressbar: true,
446 progress: 100,
447
448=== modified file 'lib/lp/app/javascript/tests/test_lp_collapsibles.html'
449--- lib/lp/app/javascript/tests/test_lp_collapsibles.html 2010-11-15 20:42:40 +0000
450+++ lib/lp/app/javascript/tests/test_lp_collapsibles.html 2010-12-01 21:32:51 +0000
451@@ -17,7 +17,7 @@
452 <!-- The test suite -->
453 <script type="text/javascript" src="test_lp_collapsibles.js"></script>
454 </head>
455-<body class="yui-skin-sam">
456+<body class="yui3-skin-sam">
457 <div id="container-of-stuff">
458 </div>
459 </body>
460
461=== modified file 'lib/lp/app/javascript/tests/test_lp_collapsibles.js'
462--- lib/lp/app/javascript/tests/test_lp_collapsibles.js 2010-11-15 20:42:40 +0000
463+++ lib/lp/app/javascript/tests/test_lp_collapsibles.js 2010-12-01 21:32:51 +0000
464@@ -3,7 +3,8 @@
465 YUI({
466 base: '../../../../canonical/launchpad/icing/yui/',
467 filter: 'raw',
468- combine: false
469+ combine: false,
470+ fetchCSS: false
471 }).use('test', 'console', 'lp', function(Y) {
472
473 var Assert = Y.Assert; // For easy access to isTrue(), etc.
474
475=== modified file 'lib/lp/app/templates/base-layout-macros.pt'
476--- lib/lp/app/templates/base-layout-macros.pt 2010-12-01 21:32:45 +0000
477+++ lib/lp/app/templates/base-layout-macros.pt 2010-12-01 21:32:51 +0000
478@@ -656,7 +656,16 @@
479 tal:content="string:var cookie_scope = '${request/lp:cookie_scope}';"></script>
480 <script type="text/javascript">
481 // Define a global YUI sandbox that should be used by everyone.
482- var LPS = YUI();
483+ var LPS = YUI({
484+ // Don't try to fetch the loader module.
485+ bootstrap: false,
486+ // Don't try to fetch CSS files.
487+ fetchCSS: false,
488+ // Turn off combo loading.
489+ combine: false,
490+ // For paranoia, set a low timeout to not wait on loading a resource.
491+ timeout: 50
492+ });
493 </script>
494 </metal:load-javascript>
495
496
497=== modified file 'lib/lp/app/templates/base-layout.pt'
498--- lib/lp/app/templates/base-layout.pt 2010-11-26 21:28:00 +0000
499+++ lib/lp/app/templates/base-layout.pt 2010-12-01 21:32:51 +0000
500@@ -69,7 +69,7 @@
501 tal:attributes="class string:tab-${view/menu:selectedfacetname}
502 ${view/macro:pagetype}
503 ${view/context/fmt:public-private-css}
504- yui-skin-sam">
505+ yui3-skin-sam">
506 <script type="text/javascript"
507 tal:condition="python: is_lpnet">
508 var _gaq = _gaq || [];
509
510=== modified file 'lib/lp/app/templates/launchpad-widget-macros.pt'
511--- lib/lp/app/templates/launchpad-widget-macros.pt 2010-10-15 01:27:04 +0000
512+++ lib/lp/app/templates/launchpad-widget-macros.pt 2010-12-01 21:32:51 +0000
513@@ -116,7 +116,7 @@
514 </tal:yui2resources>
515
516 <script type="text/javascript">
517- YUI().use('node', 'lp.app.calendar', function(Y) {
518+ LPS.use('node', 'lp.app.calendar', function(Y) {
519 Y.lp.app.calendar.setup_calendar_widgets();
520 });
521 </script>
522
523=== modified file 'lib/lp/bugs/browser/bugalsoaffects.py'
524--- lib/lp/bugs/browser/bugalsoaffects.py 2010-11-23 23:22:27 +0000
525+++ lib/lp/bugs/browser/bugalsoaffects.py 2010-12-01 21:32:51 +0000
526@@ -195,7 +195,7 @@
527 structured("""
528 There is no project in Launchpad named "%s". Please
529 <a href="/projects"
530- onclick="YUI().use('event').Event.simulate(
531+ onclick="LPS.use('event').Event.simulate(
532 document.getElementById('%s'), 'click');
533 return false;"
534 >search for it</a> as it may be
535
536=== modified file 'lib/lp/bugs/javascript/bugtask_index.js'
537--- lib/lp/bugs/javascript/bugtask_index.js 2010-08-02 17:49:45 +0000
538+++ lib/lp/bugs/javascript/bugtask_index.js 2010-12-01 21:32:51 +0000
539@@ -1338,8 +1338,8 @@
540 bugtarget_content.replaceChild(
541 Y.DOM.create(
542 '<a href="+editstatus" ' +
543- ' class="sprite edit yui-activator-act" />'),
544- bugtarget_content.one('.yui-activator-act'));
545+ ' class="sprite edit yui3-activator-act" />'),
546+ bugtarget_content.one('.yui3-activator-act'));
547 } else {
548 var bugtarget_picker = Y.lp.app.picker.addPickerPatcher(
549 'Product',
550
551=== modified file 'lib/lp/bugs/javascript/official_bug_tags.js'
552--- lib/lp/bugs/javascript/official_bug_tags.js 2010-11-03 15:49:43 +0000
553+++ lib/lp/bugs/javascript/official_bug_tags.js 2010-12-01 21:32:51 +0000
554@@ -355,7 +355,7 @@
555 '<img src="/@@/error" />&nbsp;Invalid Tag</span>',
556 bodyContent: Y.Lang.substitute(ERROR_MSG, {new_tag: new_tag}),
557 align: {
558- points: [Y.WidgetPositionExt.CC, Y.WidgetPositionExt.CC]
559+ points: [Y.WidgetPositionAlign.CC, Y.WidgetPositionAlign.CC]
560 },
561 progressbar: false,
562 progress: 0
563
564=== modified file 'lib/lp/bugs/javascript/tests/test_bug_subscription_widget.html'
565--- lib/lp/bugs/javascript/tests/test_bug_subscription_widget.html 2010-08-20 13:22:03 +0000
566+++ lib/lp/bugs/javascript/tests/test_bug_subscription_widget.html 2010-12-01 21:32:51 +0000
567@@ -35,7 +35,7 @@
568 .unseen { display: none; }
569 </style>
570 </head>
571-<body class="yui-skin-sam">
572+<body class="yui3-skin-sam">
573 <div id="log"></div>
574 </body>
575 </html>
576
577=== modified file 'lib/lp/bugs/javascript/tests/test_bug_subscription_widget.js'
578--- lib/lp/bugs/javascript/tests/test_bug_subscription_widget.js 2010-08-20 14:17:56 +0000
579+++ lib/lp/bugs/javascript/tests/test_bug_subscription_widget.js 2010-12-01 21:32:51 +0000
580@@ -3,7 +3,8 @@
581 YUI({
582 base: '../../../../canonical/launchpad/icing/yui/',
583 filter: 'raw',
584- combine: false
585+ combine: false,
586+ fetchCSS: false
587 }).use(
588 'event', 'lp.bugs.bug_subscription_widget', 'node', 'test',
589 'widget-stack', 'console', function(Y) {
590
591=== modified file 'lib/lp/bugs/javascript/tests/test_me_too.html'
592--- lib/lp/bugs/javascript/tests/test_me_too.html 2010-07-11 00:32:53 +0000
593+++ lib/lp/bugs/javascript/tests/test_me_too.html 2010-12-01 21:32:51 +0000
594@@ -35,7 +35,7 @@
595 .unseen { display: none; }
596 </style>
597 </head>
598-<body class="yui-skin-sam">
599+<body class="yui3-skin-sam">
600 <div id="log"></div>
601 </body>
602 </html>
603
604=== modified file 'lib/lp/bugs/javascript/tests/test_me_too.js'
605--- lib/lp/bugs/javascript/tests/test_me_too.js 2010-10-24 21:00:11 +0000
606+++ lib/lp/bugs/javascript/tests/test_me_too.js 2010-12-01 21:32:51 +0000
607@@ -3,7 +3,8 @@
608 YUI({
609 base: '../../../../canonical/launchpad/icing/yui/',
610 filter: 'raw',
611- combine: false
612+ combine: false,
613+ fetchCSS: false
614 }).use('event', 'lp.bugs.bugtask_index', 'node', 'test', 'widget-stack', 'console',
615 function(Y) {
616
617@@ -20,19 +21,6 @@
618 Y.Event.simulate(rawnode, evtype, options);
619 }
620
621-/* Helper function to clean up a dynamically added widget instance. */
622-function cleanup_widget(widget) {
623- // Nuke the boundingBox, but only if we've touched the DOM.
624- if (widget.get('rendered')) {
625- var bb = widget.get('boundingBox');
626- if (bb.get('parentNode')) {
627- bb.get('parentNode').removeChild(bb);
628- }
629- }
630- // Kill the widget itself.
631- widget.destroy();
632-}
633-
634 var suite = new Y.Test.Suite("Bugtask Me-Too Choice Edit Tests");
635
636 suite.add(new Y.Test.Case({
637@@ -79,9 +67,6 @@
638 },
639
640 tearDown: function() {
641- if (this.choice_edit._choice_list) {
642- cleanup_widget(this.choice_edit._choice_list);
643- }
644 var status = Y.one("document").one("#affectsmetoo");
645 if (status) {
646 status.get("parentNode").removeChild(status);
647
648=== modified file 'lib/lp/bugs/javascript/tests/test_subscriber.html'
649--- lib/lp/bugs/javascript/tests/test_subscriber.html 2010-07-11 00:32:53 +0000
650+++ lib/lp/bugs/javascript/tests/test_subscriber.html 2010-12-01 21:32:51 +0000
651@@ -29,7 +29,7 @@
652 div#sample {margin:15px; width:200px; border:1px solid #999; padding:10px;}
653 </style>
654 </head>
655- <body class="yui-skin-sam">
656+ <body class="yui3-skin-sam">
657 <!-- Example markup required by test suite -->
658 <div id="sample">
659 <div class="section">
660
661=== modified file 'lib/lp/bugs/javascript/tests/test_subscriber.js'
662--- lib/lp/bugs/javascript/tests/test_subscriber.js 2010-07-11 00:32:53 +0000
663+++ lib/lp/bugs/javascript/tests/test_subscriber.js 2010-12-01 21:32:51 +0000
664@@ -1,6 +1,6 @@
665 YUI({
666 base: '../../../../canonical/launchpad/icing/yui/',
667- filter: 'raw', combine: false
668+ filter: 'raw', combine: false, fetchCSS: false
669 }).use('test', 'console', 'lp.bugs.subscriber', function(Y) {
670
671 var suite = new Y.Test.Suite("lp.bugs.subscriber Tests");
672
673=== modified file 'lib/lp/bugs/templates/bugtarget-patches.pt'
674--- lib/lp/bugs/templates/bugtarget-patches.pt 2010-08-03 18:13:34 +0000
675+++ lib/lp/bugs/templates/bugtarget-patches.pt 2010-12-01 21:32:51 +0000
676@@ -20,7 +20,7 @@
677 tal:attributes="action string:${context/fmt:url}/+patches">
678
679 <script type="text/javascript">
680- YUI().use('base', 'node', 'event', function(Y) {
681+ LPS.use('base', 'node', 'event', function(Y) {
682 Y.on('domready', function(e) {
683 Y.get('#sort-button').setStyle('display', 'none');
684 Y.get('#orderby').on('change', function(e) {
685@@ -87,7 +87,7 @@
686 <p tal:content="string:${patch/title}"></p>
687 </div>
688 <script type="text/javascript" tal:content="string:
689- YUI().use('base', 'node', 'event', function(Y) {
690+ LPS.use('base', 'node', 'event', function(Y) {
691 Y.on('domready', function(e) {
692 var cell_id = '#patch-cell-${repeat/patch_task/index}';
693 var target_id = '#patch-popup-${repeat/patch_task/index}';
694
695=== modified file 'lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt'
696--- lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt 2010-06-15 13:51:55 +0000
697+++ lib/lp/bugs/templates/bugtask-tasks-and-nominations-table-row.pt 2010-12-01 21:32:51 +0000
698@@ -38,7 +38,7 @@
699 </td>
700 <td tal:condition="not:indent_task">
701 <span tal:attributes="id string:bugtarget-picker-${row_id}">
702- <span class="yui-activator-data-box">
703+ <span class="yui3-activator-data-box">
704 <span title="This project&rsquo;s license has not been specified.">
705 <a tal:attributes="href context/target/fmt:url;
706 title view/target_link_title;
707@@ -46,10 +46,10 @@
708 tal:content="context/bugtargetdisplayname" />
709 </span>
710 </span>
711- <button class="lazr-btn yui-activator-act yui-activator-hidden">
712+ <button class="lazr-btn yui3-activator-act yui3-activator-hidden">
713 Edit
714 </button>
715- <div class="yui-activator-message-box yui-activator-hidden" />
716+ <div class="yui3-activator-message-box yui3-activator-hidden" />
717 </span>
718 </td>
719
720@@ -131,7 +131,7 @@
721
722 <tal:has_no_watch condition="not: context/bugwatch">
723 <span tal:attributes="id string:assignee-picker-${row_id}">
724- <span class="yui-activator-data-box">
725+ <span class="yui3-activator-data-box">
726 <a tal:condition="context/assignee"
727 tal:attributes="href context/assignee/fmt:url;
728 class context/assignee/image:sprite_css"
729@@ -140,10 +140,10 @@
730 Unassigned
731 </tal:unassigned>
732 </span>
733- <button class="lazr-btn yui-activator-act yui-activator-hidden">
734+ <button class="lazr-btn yui3-activator-act yui3-activator-hidden">
735 Edit
736 </button>
737- <div class="yui-activator-message-box yui-activator-hidden" />
738+ <div class="yui3-activator-message-box yui3-activator-hidden" />
739 </span>
740 </tal:has_no_watch>
741 </td>
742
743=== renamed file 'lib/lp/bugs/windmill/tests/test_bug_also_affects_new_upstream.py.disabled' => 'lib/lp/bugs/windmill/tests/test_bug_also_affects_new_upstream.py'
744=== renamed file 'lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py.disabled' => 'lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py'
745--- lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py.disabled 2010-12-01 21:32:45 +0000
746+++ lib/lp/bugs/windmill/tests/test_bug_inline_subscriber.py 2010-12-01 21:32:51 +0000
747@@ -193,6 +193,7 @@
748 id=u'subscribers-links', timeout=FOR_ELEMENT)
749 # Confirm there are 2 subscriber links: one in duplicate subscribers,
750 # and one in indirect subscribers.
751+ client.waits.sleep(milliseconds=SLEEP)
752 client.asserts.assertNode(
753 xpath=(u'//div[@id="subscribers-from-duplicates"]'
754 '/div/a[@name="Sample Person"]'))
755@@ -228,7 +229,7 @@
756 # Now back to bug 5. Confirm there are 2 subscriptions.
757 client.open(url=bug_url % 5)
758 client.waits.forPageLoad(timeout=PAGE_LOAD)
759- client.asserts.assertNode(
760+ client.waits.forElement(
761 id='direct-subscriber-12', timeout=FOR_ELEMENT)
762 # The first click unsubscribes the direct subscription, leaving
763 # the duplicate subscription.
764
765=== renamed file 'lib/lp/bugs/windmill/tests/test_bug_me_too.py.disabled' => 'lib/lp/bugs/windmill/tests/test_bug_me_too.py'
766=== renamed file 'lib/lp/bugs/windmill/tests/test_bug_tags_entry.py.disabled' => 'lib/lp/bugs/windmill/tests/test_bug_tags_entry.py'
767=== modified file 'lib/lp/bugs/windmill/tests/test_mark_duplicate.py'
768--- lib/lp/bugs/windmill/tests/test_mark_duplicate.py 2010-12-01 21:32:45 +0000
769+++ lib/lp/bugs/windmill/tests/test_mark_duplicate.py 2010-12-01 21:32:51 +0000
770@@ -78,7 +78,8 @@
771 client.click(xpath=CHANGE_BUTTON)
772 client.waits.forElement(
773 xpath=u"//span[@id='mark-duplicate-text']/"
774- u"a[contains(., 'Mark as duplicate')]")
775+ u"a[contains(., 'Mark as duplicate')]",
776+ timeout=constants.FOR_ELEMENT)
777
778 # The warning about commenting on a diplucate bug is now gone.
779 client.asserts.assertNotNode(id='warning-comment-on-duplicate')
780@@ -87,15 +88,19 @@
781 client.click(id=u'mark-duplicate-text')
782 client.type(text=u'123', id=u'field.duplicateof')
783 client.click(xpath=CHANGE_BUTTON)
784+ client.waits.sleep(milliseconds=constants.SLEEP)
785 error_xpath = (
786 MAIN_FORM_ELEMENT +
787 "//div[contains(@class, 'yui3-lazr-formoverlay-errors')]/ul/li")
788- client.waits.forElement(xpath=error_xpath)
789+ client.waits.forElement(
790+ xpath=error_xpath, timeout=constants.FOR_ELEMENT)
791
792 # Clicking change again brings back the error dialog again
793 # (regression test for bug 347258)
794 client.click(xpath=CHANGE_BUTTON)
795- client.waits.forElement(xpath=error_xpath)
796+ client.waits.sleep(milliseconds=constants.SLEEP)
797+ client.waits.forElement(
798+ xpath=error_xpath, timeout=constants.FOR_ELEMENT)
799
800 # But entering a correct bug and submitting
801 # gets us back to a normal state
802@@ -103,19 +108,26 @@
803 client.click(xpath=CHANGE_BUTTON)
804 client.waits.forElement(
805 xpath=u"//span[@id='mark-duplicate-text']"
806- u"/a[contains(., 'bug #1')]")
807+ u"/a[contains(., 'bug #1')]",
808+ timeout=constants.FOR_ELEMENT)
809
810 # Finally, clicking on the link to the bug takes you to the master.
811 client.click(link=u'bug #1')
812 client.waits.forPageLoad(timeout=constants.PAGE_LOAD)
813- client.asserts.assertText(
814- xpath=u"//h1[@id='bug-title']/span[1]",
815- validator=u'Firefox does not support SVG')
816+ client.waits.forElement(
817+ id=u'bug-title', timeout=constants.FOR_ELEMENT)
818+
819+ # Make sure all js loads are complete before trying the next test.
820+ client.waits.forElement(
821+ xpath="//a[contains(@class, 'js-action') and "
822+ "contains(@class, 'menu-link-mark-dupe')]",
823+ timeout=constants.FOR_ELEMENT)
824
825 # If someone wants to set the master to dupe another bug, there
826 # is a warning in the dupe widget about this bug having its own
827 # duplicates.
828 client.click(classname='menu-link-mark-dupe')
829+ client.waits.sleep(milliseconds=constants.SLEEP)
830 client.asserts.assertTextIn(
831 classname='large-warning', validator=u'This bug has duplicates',
832 timeout=constants.FOR_ELEMENT)
833
834=== modified file 'lib/lp/bugs/windmill/tests/test_official_bug_tags_management.py'
835--- lib/lp/bugs/windmill/tests/test_official_bug_tags_management.py 2010-12-01 21:32:45 +0000
836+++ lib/lp/bugs/windmill/tests/test_official_bug_tags_management.py 2010-12-01 21:32:51 +0000
837@@ -43,7 +43,8 @@
838
839 client.asserts.assertElemJS(
840 id=u'official-tags-list',
841- js=u'element.childNodes.length == 0')
842+ js=u'element.childNodes.length == 0',
843+ timeout=constants.FOR_ELEMENT)
844
845 # The save button is disabled initially, since there's nothing to change.
846
847@@ -194,13 +195,16 @@
848 client.waits.forPageLoad(timeout=constants.PAGE_LOAD)
849 client.asserts.assertNode(
850 xpath=u'//ul[@id="official-tags-list"]/li[@id="tag-%s"]' %
851- a_new_tag)
852- client.asserts.assertNode(
853- xpath=u'//ul[@id="official-tags-list"]/li[@id="tag-%s"]' %
854- another_new_tag)
855- client.asserts.assertNode(
856- xpath=u'//ul[@id="official-tags-list"]/li[@id="tag-%s"]' %
857- doc_tag)
858+ a_new_tag,
859+ timeout=constants.FOR_ELEMENT)
860+ client.asserts.assertNode(
861+ xpath=u'//ul[@id="official-tags-list"]/li[@id="tag-%s"]' %
862+ another_new_tag,
863+ timeout=constants.FOR_ELEMENT)
864+ client.asserts.assertNode(
865+ xpath=u'//ul[@id="official-tags-list"]/li[@id="tag-%s"]' %
866+ doc_tag,
867+ timeout=constants.FOR_ELEMENT)
868
869 # We finish by cleaning after ourselves, to make sure that we leave the
870 # database at the same state we found it.
871
872=== added file 'lib/lp/code/interfaces/branchmergequeue.py'
873--- lib/lp/code/interfaces/branchmergequeue.py 1970-01-01 00:00:00 +0000
874+++ lib/lp/code/interfaces/branchmergequeue.py 2010-11-03 08:28:44 +0000
875@@ -0,0 +1,129 @@
876+# Copyright 2009-2010 Canonical Ltd. This software is licensed under the
877+# GNU Affero General Public License version 3 (see the file LICENSE).
878+
879+"""Branch merge queue interfaces."""
880+
881+__metaclass__ = type
882+
883+__all__ = [
884+ 'IBranchMergeQueue',
885+ 'IBranchMergeQueueSource',
886+ 'user_has_special_merge_queue_access',
887+ ]
888+
889+from lazr.restful.declarations import (
890+ export_as_webservice_entry,
891+ export_write_operation,
892+ exported,
893+ mutator_for,
894+ operation_parameters,
895+ )
896+from lazr.restful.fields import (
897+ CollectionField,
898+ Reference,
899+ )
900+from zope.component import getUtility
901+from zope.interface import Interface
902+from zope.schema import (
903+ Datetime,
904+ Int,
905+ Text,
906+ TextLine,
907+ )
908+
909+from canonical.launchpad import _
910+from canonical.launchpad.interfaces.launchpad import ILaunchpadCelebrities
911+from lp.services.fields import (
912+ PersonChoice,
913+ PublicPersonChoice,
914+ )
915+
916+
917+class IBranchMergeQueue(Interface):
918+ """An interface for managing branch merges."""
919+
920+ export_as_webservice_entry()
921+
922+ id = Int(title=_('ID'), readonly=True, required=True)
923+
924+ registrant = exported(
925+ PublicPersonChoice(
926+ title=_("The user that registered the branch."),
927+ required=True, readonly=True,
928+ vocabulary='ValidPersonOrTeam'))
929+
930+ owner = exported(
931+ PersonChoice(
932+ title=_('Owner'),
933+ required=True, readonly=True,
934+ vocabulary='UserTeamsParticipationPlusSelf',
935+ description=_("The owner of the merge queue.")))
936+
937+ name = exported(
938+ TextLine(
939+ title=_('Name'), required=True,
940+ description=_(
941+ "Keep very short, unique, and descriptive, because it will "
942+ "be used in URLs. "
943+ "Examples: main, devel, release-1.0, gnome-vfs.")))
944+
945+ description = exported(
946+ Text(
947+ title=_('Description'), required=False,
948+ description=_(
949+ 'A short description of the purpose of this merge queue.')))
950+
951+ configuration = exported(
952+ TextLine(
953+ title=_('Configuration'), required=False, readonly=True,
954+ description=_(
955+ "A JSON string of configuration values.")))
956+
957+ date_created = exported(
958+ Datetime(
959+ title=_('Date Created'),
960+ required=True,
961+ readonly=True))
962+
963+ branches = exported(
964+ CollectionField(
965+ title=_('Dependent Branches'),
966+ description=_(
967+ 'A collection of branches that this queue manages.'),
968+ readonly=True,
969+ value_type=Reference(Interface)))
970+
971+ @mutator_for(configuration)
972+ @operation_parameters(
973+ config=TextLine(title=_("A JSON string of configuration values.")))
974+ @export_write_operation()
975+ def setMergeQueueConfig(config):
976+ """Set the JSON string configuration of the merge queue.
977+
978+ :param config: A JSON string of configuration values.
979+ """
980+
981+
982+class IBranchMergeQueueSource(Interface):
983+
984+ def new(name, owner, registrant, description, configuration, branches):
985+ """Create a new IBranchMergeQueue object.
986+
987+ :param name: The name of the branch merge queue.
988+ :param description: A description of queue.
989+ :param configuration: A JSON string of configuration values.
990+ :param owner: The owner of the queue.
991+ :param registrant: The registrant of the queue.
992+ :param branches: A list of branches to add to the queue.
993+ """
994+
995+
996+def user_has_special_merge_queue_access(user):
997+ """Admins and bazaar experts have special access.
998+
999+ :param user: A 'Person' or None.
1000+ """
1001+ if user is None:
1002+ return False
1003+ celebs = getUtility(ILaunchpadCelebrities)
1004+ return user.inTeam(celebs.admin) or user.inTeam(celebs.bazaar_experts)
1005
1006=== modified file 'lib/lp/code/javascript/branchmergeproposal.diff.js'
1007--- lib/lp/code/javascript/branchmergeproposal.diff.js 2010-12-01 21:32:45 +0000
1008+++ lib/lp/code/javascript/branchmergeproposal.diff.js 2010-12-01 21:32:51 +0000
1009@@ -73,8 +73,8 @@
1010 var diff_overlay = new DiffOverlay({
1011 bodyContent: Y.Node.create(formatted_diff),
1012 align: {
1013- points: [Y.WidgetPositionExt.CC,
1014- Y.WidgetPositionExt.CC]
1015+ points: [Y.WidgetPositionAlign.CC,
1016+ Y.WidgetPositionAlign.CC]
1017 },
1018 progressbar: false
1019 });
1020
1021=== modified file 'lib/lp/code/javascript/tests/test_productseries-setbranch.html'
1022--- lib/lp/code/javascript/tests/test_productseries-setbranch.html 2010-04-29 15:21:05 +0000
1023+++ lib/lp/code/javascript/tests/test_productseries-setbranch.html 2010-12-01 21:32:51 +0000
1024@@ -16,7 +16,7 @@
1025 <!-- The module under test -->
1026 <script type="text/javascript" src="../productseries-setbranch.js"></script>
1027 <script type="text/javascript">
1028- YUI().use('lp.code.productseries_setbranch', function(Y) {
1029+ LPS.use('lp.code.productseries_setbranch', function(Y) {
1030 Y.on('domready', Y.lp.code.productseries_setbranch.setup);
1031 });
1032 </script>
1033@@ -25,7 +25,7 @@
1034 <script type="text/javascript" src="test_productseries_setbranch.js"></script>
1035 </head>
1036
1037-<body class="yui-skin-sam">
1038+<body class="yui3-skin-sam">
1039 <div id="productseries-setbranch">
1040 <form action="." name="launchpadform" method="post"
1041 enctype="multipart/form-data"
1042
1043=== modified file 'lib/lp/code/javascript/tests/test_productseries_setbranch.js'
1044--- lib/lp/code/javascript/tests/test_productseries_setbranch.js 2010-04-07 13:05:43 +0000
1045+++ lib/lp/code/javascript/tests/test_productseries_setbranch.js 2010-12-01 21:32:51 +0000
1046@@ -7,7 +7,7 @@
1047
1048 YUI({
1049 base: '../../../../canonical/launchpad/icing/yui/',
1050- filter: 'raw', combine: false
1051+ filter: 'raw', combine: false, fetchCSS: false
1052 }).use('node-event-simulate', 'test', 'console', 'Event', 'CustomEvent',
1053 'lp.code.productseries_setbranch', function(Y) {
1054
1055
1056=== added file 'lib/lp/code/model/branchmergequeue.py'
1057--- lib/lp/code/model/branchmergequeue.py 1970-01-01 00:00:00 +0000
1058+++ lib/lp/code/model/branchmergequeue.py 2010-11-01 12:35:07 +0000
1059@@ -0,0 +1,88 @@
1060+# Copyright 2010 Canonical Ltd. This software is licensed under the
1061+# GNU Affero General Public License version 3 (see the file LICENSE).
1062+
1063+"""Implementation classes for IBranchMergeQueue, etc."""
1064+
1065+__metaclass__ = type
1066+__all__ = ['BranchMergeQueue']
1067+
1068+import simplejson
1069+from storm.locals import (
1070+ Int,
1071+ Reference,
1072+ Store,
1073+ Storm,
1074+ Unicode,
1075+ )
1076+from zope.interface import (
1077+ classProvides,
1078+ implements,
1079+ )
1080+
1081+from canonical.database.datetimecol import UtcDateTimeCol
1082+from canonical.launchpad.interfaces.lpstorm import IMasterStore
1083+from lp.code.errors import InvalidMergeQueueConfig
1084+from lp.code.interfaces.branchmergequeue import (
1085+ IBranchMergeQueue,
1086+ IBranchMergeQueueSource,
1087+ )
1088+from lp.code.model.branch import Branch
1089+
1090+
1091+class BranchMergeQueue(Storm):
1092+ """See `IBranchMergeQueue`."""
1093+
1094+ __storm_table__ = 'BranchMergeQueue'
1095+ implements(IBranchMergeQueue)
1096+ classProvides(IBranchMergeQueueSource)
1097+
1098+ id = Int(primary=True)
1099+
1100+ registrant_id = Int(name='registrant', allow_none=True)
1101+ registrant = Reference(registrant_id, 'Person.id')
1102+
1103+ owner_id = Int(name='owner', allow_none=True)
1104+ owner = Reference(owner_id, 'Person.id')
1105+
1106+ name = Unicode(allow_none=False)
1107+ description = Unicode(allow_none=False)
1108+ configuration = Unicode(allow_none=False)
1109+
1110+ date_created = UtcDateTimeCol(notNull=True)
1111+
1112+ @property
1113+ def branches(self):
1114+ """See `IBranchMergeQueue`."""
1115+ return Store.of(self).find(
1116+ Branch,
1117+ Branch.merge_queue_id == self.id)
1118+
1119+ def setMergeQueueConfig(self, config):
1120+ """See `IBranchMergeQueue`."""
1121+ try:
1122+ simplejson.loads(config)
1123+ self.configuration = config
1124+ except ValueError: # The config string is not valid JSON
1125+ raise InvalidMergeQueueConfig
1126+
1127+ @classmethod
1128+ def new(cls, name, owner, registrant, description=None,
1129+ configuration=None, branches=None):
1130+ """See `IBranchMergeQueueSource`."""
1131+ store = IMasterStore(BranchMergeQueue)
1132+
1133+ if configuration is None:
1134+ configuration = unicode(simplejson.dumps({}))
1135+
1136+ queue = cls()
1137+ queue.name = name
1138+ queue.owner = owner
1139+ queue.registrant = registrant
1140+ queue.description = description
1141+ queue.configuration = configuration
1142+ if branches is not None:
1143+ for branch in branches:
1144+ branch.addToQueue(queue)
1145+
1146+ store.add(queue)
1147+ return queue
1148
1149=== added file 'lib/lp/code/model/tests/test_branchmergequeue.py'
1150--- lib/lp/code/model/tests/test_branchmergequeue.py 1970-01-01 00:00:00 +0000
1151+++ lib/lp/code/model/tests/test_branchmergequeue.py 2010-10-25 14:51:56 +0000
1152@@ -0,0 +1,155 @@
1153+# Copyright 2010 Canonical Ltd. This software is licensed under the
1154+# GNU Affero General Public License version 3 (see the file LICENSE).
1155+
1156+"""Unit tests for methods of BranchMergeQueue."""
1157+
1158+from __future__ import with_statement
1159+
1160+import simplejson
1161+
1162+from canonical.launchpad.interfaces.lpstorm import IStore
1163+from canonical.launchpad.webapp.testing import verifyObject
1164+from canonical.testing.layers import (
1165+ AppServerLayer,
1166+ DatabaseFunctionalLayer,
1167+ )
1168+from lp.code.errors import InvalidMergeQueueConfig
1169+from lp.code.interfaces.branchmergequeue import IBranchMergeQueue
1170+from lp.code.model.branchmergequeue import BranchMergeQueue
1171+from lp.testing import (
1172+ ANONYMOUS,
1173+ person_logged_in,
1174+ launchpadlib_for,
1175+ TestCaseWithFactory,
1176+ ws_object,
1177+ )
1178+
1179+
1180+class TestBranchMergeQueueInterface(TestCaseWithFactory):
1181+ """Test IBranchMergeQueue interface."""
1182+
1183+ layer = DatabaseFunctionalLayer
1184+
1185+ def test_implements_interface(self):
1186+ queue = self.factory.makeBranchMergeQueue()
1187+ IStore(BranchMergeQueue).add(queue)
1188+ verifyObject(IBranchMergeQueue, queue)
1189+
1190+
1191+class TestBranchMergeQueueSource(TestCaseWithFactory):
1192+ """Test the methods of IBranchMergeQueueSource."""
1193+
1194+ layer = DatabaseFunctionalLayer
1195+
1196+ def test_new(self):
1197+ owner = self.factory.makePerson()
1198+ name = u'SooperQueue'
1199+ description = u'This is Sooper Queue'
1200+ config = unicode(simplejson.dumps({'test': 'make check'}))
1201+
1202+ queue = BranchMergeQueue.new(
1203+ name, owner, owner, description, config)
1204+
1205+ self.assertEqual(queue.name, name)
1206+ self.assertEqual(queue.owner, owner)
1207+ self.assertEqual(queue.registrant, owner)
1208+ self.assertEqual(queue.description, description)
1209+ self.assertEqual(queue.configuration, config)
1210+
1211+
1212+class TestBranchMergeQueue(TestCaseWithFactory):
1213+ """Test the functions of the BranchMergeQueue."""
1214+
1215+ layer = DatabaseFunctionalLayer
1216+
1217+ def test_branches(self):
1218+ """Test that a merge queue can get all its managed branches."""
1219+ store = IStore(BranchMergeQueue)
1220+
1221+ queue = self.factory.makeBranchMergeQueue()
1222+ store.add(queue)
1223+
1224+ branch = self.factory.makeBranch()
1225+ store.add(branch)
1226+ with person_logged_in(branch.owner):
1227+ branch.addToQueue(queue)
1228+
1229+ self.assertEqual(
1230+ list(queue.branches),
1231+ [branch])
1232+
1233+ def test_setMergeQueueConfig(self):
1234+ """Test that the configuration is set properly."""
1235+ queue = self.factory.makeBranchMergeQueue()
1236+ config = unicode(simplejson.dumps({
1237+ 'test': 'make test'}))
1238+
1239+ with person_logged_in(queue.owner):
1240+ queue.setMergeQueueConfig(config)
1241+
1242+ self.assertEqual(queue.configuration, config)
1243+
1244+ def test_setMergeQueueConfig_invalid_json(self):
1245+ """Test that invalid json can't be set as the config."""
1246+ queue = self.factory.makeBranchMergeQueue()
1247+
1248+ with person_logged_in(queue.owner):
1249+ self.assertRaises(
1250+ InvalidMergeQueueConfig,
1251+ queue.setMergeQueueConfig,
1252+ 'abc')
1253+
1254+
1255+class TestWebservice(TestCaseWithFactory):
1256+
1257+ layer = AppServerLayer
1258+
1259+ def test_properties(self):
1260+ """Test that the correct properties are exposed."""
1261+ with person_logged_in(ANONYMOUS):
1262+ name = u'teh-queue'
1263+ description = u'Oh hai! I are a queues'
1264+ configuration = unicode(simplejson.dumps({'test': 'make check'}))
1265+
1266+ queuer = self.factory.makePerson()
1267+ db_queue = self.factory.makeBranchMergeQueue(
1268+ registrant=queuer, owner=queuer, name=name,
1269+ description=description,
1270+ configuration=configuration)
1271+ branch1 = self.factory.makeBranch()
1272+ with person_logged_in(branch1.owner):
1273+ branch1.addToQueue(db_queue)
1274+ branch2 = self.factory.makeBranch()
1275+ with person_logged_in(branch2.owner):
1276+ branch2.addToQueue(db_queue)
1277+ launchpad = launchpadlib_for('test', db_queue.owner,
1278+ service_root="http://api.launchpad.dev:8085")
1279+
1280+ queuer = ws_object(launchpad, queuer)
1281+ queue = ws_object(launchpad, db_queue)
1282+ branch1 = ws_object(launchpad, branch1)
1283+ branch2 = ws_object(launchpad, branch2)
1284+
1285+ self.assertEqual(queue.registrant, queuer)
1286+ self.assertEqual(queue.owner, queuer)
1287+ self.assertEqual(queue.name, name)
1288+ self.assertEqual(queue.description, description)
1289+ self.assertEqual(queue.configuration, configuration)
1290+ self.assertEqual(queue.date_created, db_queue.date_created)
1291+ self.assertEqual(len(queue.branches), 2)
1292+
1293+ def test_set_configuration(self):
1294+ """Test the mutator for setting configuration."""
1295+ with person_logged_in(ANONYMOUS):
1296+ db_queue = self.factory.makeBranchMergeQueue()
1297+ launchpad = launchpadlib_for('test', db_queue.owner,
1298+ service_root="http://api.launchpad.dev:8085")
1299+
1300+ configuration = simplejson.dumps({'test': 'make check'})
1301+
1302+ queue = ws_object(launchpad, db_queue)
1303+ queue.configuration = configuration
1304+ queue.lp_save()
1305+
1306+ queue2 = ws_object(launchpad, db_queue)
1307+ self.assertEqual(queue2.configuration, configuration)
1308
1309=== modified file 'lib/lp/code/windmill/tests/test_branch_popupdiff.py'
1310--- lib/lp/code/windmill/tests/test_branch_popupdiff.py 2010-12-01 21:32:45 +0000
1311+++ lib/lp/code/windmill/tests/test_branch_popupdiff.py 2010-12-01 21:32:51 +0000
1312@@ -134,6 +134,7 @@
1313 client.waits.sleep(milliseconds=JS_ONLOAD_EXECUTE_DELAY)
1314
1315 client.click(xpath=ADD_BRANCH_MENU)
1316+ client.waits.sleep(milliseconds=JS_ONLOAD_EXECUTE_DELAY)
1317 client.waits.forElement(xpath=BRANCH_SEARCH_FIELD)
1318 client.type(text='~fred/fooix/proposed', xpath=BRANCH_SEARCH_FIELD)
1319 client.click(xpath=BRANCH_SEARCH_BUTTON)
1320
1321=== modified file 'lib/lp/code/windmill/tests/test_branchmergeproposal_review.py'
1322--- lib/lp/code/windmill/tests/test_branchmergeproposal_review.py 2010-11-04 19:59:02 +0000
1323+++ lib/lp/code/windmill/tests/test_branchmergeproposal_review.py 2010-12-01 21:32:51 +0000
1324@@ -17,6 +17,7 @@
1325 search_and_select_picker_widget,
1326 )
1327 from lp.code.windmill.testing import CodeWindmillLayer
1328+from canonical.launchpad.windmill.testing import constants
1329 from lp.testing import (
1330 login_person,
1331 WindmillTestCase,
1332@@ -49,6 +50,7 @@
1333 client.waits.forPageLoad(timeout=u'10000')
1334
1335 link = u'//a[@class="menu-link-register_merge sprite add"]'
1336+ client.waits.forElement(xpath=link, timeout=constants.FOR_ELEMENT)
1337 client.click(xpath=link)
1338 client.type(text=u'~name12/gnome-terminal/main',
1339 id=u'field.target_branch.target_branch')
1340
1341=== modified file 'lib/lp/registry/browser/__init__.py'
1342--- lib/lp/registry/browser/__init__.py 2010-09-28 05:20:22 +0000
1343+++ lib/lp/registry/browser/__init__.py 2010-12-01 21:32:51 +0000
1344@@ -112,7 +112,7 @@
1345 'milestone_row_uri': self.milestone_row_uri_template,
1346 }
1347 return """
1348- YUI().use(
1349+ LPS.use(
1350 'node', 'lp.registry.milestoneoverlay',
1351 'lp.registry.milestonetable',
1352 function (Y) {
1353
1354=== modified file 'lib/lp/registry/browser/person.py'
1355--- lib/lp/registry/browser/person.py 2010-11-24 10:10:07 +0000
1356+++ lib/lp/registry/browser/person.py 2010-12-01 21:32:51 +0000
1357@@ -3499,7 +3499,7 @@
1358 'center_lng': self.context.longitude}
1359 return u"""
1360 <script type="text/javascript">
1361- YUI().use('node', 'lp.app.mapping', function(Y) {
1362+ LPS.use('node', 'lp.app.mapping', function(Y) {
1363 function renderMap() {
1364 Y.lp.app.mapping.renderPersonMapSmall(
1365 %(center_lat)s, %(center_lng)s);
1366
1367=== modified file 'lib/lp/registry/browser/team.py'
1368--- lib/lp/registry/browser/team.py 2010-11-24 08:05:42 +0000
1369+++ lib/lp/registry/browser/team.py 2010-12-01 21:32:51 +0000
1370@@ -1140,7 +1140,7 @@
1371 """HTML which shows the map with location of the team's members."""
1372 return """
1373 <script type="text/javascript">
1374- YUI().use('node', 'lp.app.mapping', function(Y) {
1375+ LPS.use('node', 'lp.app.mapping', function(Y) {
1376 function renderMap() {
1377 Y.lp.app.mapping.renderTeamMap(
1378 %(min_lat)s, %(max_lat)s, %(min_lng)s,
1379@@ -1155,7 +1155,7 @@
1380 """The HTML which shows a small version of the team's map."""
1381 return """
1382 <script type="text/javascript">
1383- YUI().use('node', 'lp.app.mapping', function(Y) {
1384+ LPS.use('node', 'lp.app.mapping', function(Y) {
1385 function renderMap() {
1386 Y.lp.app.mapping.renderTeamMapSmall(
1387 %(center_lat)s, %(center_lng)s);
1388
1389=== modified file 'lib/lp/registry/browser/tests/productseries-views.txt'
1390--- lib/lp/registry/browser/tests/productseries-views.txt 2010-09-13 12:09:30 +0000
1391+++ lib/lp/registry/browser/tests/productseries-views.txt 2010-12-01 21:32:51 +0000
1392@@ -82,7 +82,7 @@
1393 >>> script = find_tag_by_id(view.render(), 'milestone-script')
1394 >>> print script
1395 <script id="milestone-script" type="text/javascript">
1396- YUI().use(... 'lp.registry.milestoneoverlay',
1397+ LPS.use(... 'lp.registry.milestoneoverlay',
1398 'lp.registry.milestonetable'...
1399 var series_uri = '/app/simple';
1400 var milestone_form_uri = '.../app/simple/+addmilestone/++form++';
1401
1402=== modified file 'lib/lp/registry/javascript/tests/test_milestone_table.html'
1403--- lib/lp/registry/javascript/tests/test_milestone_table.html 2010-11-15 20:42:40 +0000
1404+++ lib/lp/registry/javascript/tests/test_milestone_table.html 2010-12-01 21:32:51 +0000
1405@@ -18,7 +18,7 @@
1406 <script type="text/javascript" src="test_milestone_table.js"></script>
1407
1408 </head>
1409-<body class="yui-skin-sam">
1410+<body class="yui3-skin-sam">
1411 <table id="series-trunk" class="listing">
1412 <thead>
1413 <tr>
1414
1415=== modified file 'lib/lp/registry/javascript/tests/test_milestone_table.js'
1416--- lib/lp/registry/javascript/tests/test_milestone_table.js 2010-04-29 15:21:05 +0000
1417+++ lib/lp/registry/javascript/tests/test_milestone_table.js 2010-12-01 21:32:51 +0000
1418@@ -2,7 +2,7 @@
1419
1420 YUI({
1421 base: '../../../../canonical/launchpad/icing/yui/',
1422- filter: 'raw', combine: false
1423+ filter: 'raw', combine: false, fetchCSS: false
1424 }).use('test', 'console', 'lp.registry.milestonetable', function(Y) {
1425
1426 var milestonetable = Y.lp.registry.milestonetable;
1427
1428=== modified file 'lib/lp/registry/javascript/tests/timeline-iframe.html'
1429--- lib/lp/registry/javascript/tests/timeline-iframe.html 2010-04-28 18:43:25 +0000
1430+++ lib/lp/registry/javascript/tests/timeline-iframe.html 2010-12-01 21:32:51 +0000
1431@@ -41,7 +41,7 @@
1432 }
1433 </style>
1434 </head>
1435-<body class="yui-skin-sam">
1436+<body class="yui3-skin-sam">
1437 <div id="timeline_example">
1438 </div>
1439 <div id="log"></div>
1440
1441=== modified file 'lib/lp/registry/javascript/tests/timeline.js'
1442--- lib/lp/registry/javascript/tests/timeline.js 2010-04-29 15:21:05 +0000
1443+++ lib/lp/registry/javascript/tests/timeline.js 2010-12-01 21:32:51 +0000
1444@@ -3,7 +3,8 @@
1445 YUI({
1446 base: '../../../../canonical/launchpad/icing/yui/',
1447 filter: 'raw',
1448- combine: false
1449+ combine: false,
1450+ fetchCSS: false
1451 }).use('test', 'console', 'lp.registry.timeline', function(Y) {
1452
1453 var Assert = Y.Assert; // For easy access to isTrue(), etc.
1454@@ -109,12 +110,12 @@
1455 },
1456
1457 test_zoom_buttons: function() {
1458- var zoom_in = this.content_box.one('a.yui-timelinegraph-zoom-in');
1459+ var zoom_in = this.content_box.one('a.yui3-timelinegraph-zoom-in');
1460 Assert.isNotNull(
1461 zoom_in,
1462 'zoom_in link not found.');
1463
1464- var zoom_out = this.content_box.one('a.yui-timelinegraph-zoom-out');
1465+ var zoom_out = this.content_box.one('a.yui3-timelinegraph-zoom-out');
1466 Assert.isNotNull(
1467 zoom_in,
1468 'zoom_out link not found.');
1469@@ -188,7 +189,7 @@
1470 '(1st) The frame was not resized to match the canvas.');
1471
1472 simulate(
1473- this.timeline_graph, '.yui-timelinegraph-zoom-in', 'click');
1474+ this.timeline_graph, '.yui3-timelinegraph-zoom-in', 'click');
1475
1476 // The canvas is recreated in order to
1477 // resize correctly in all browsers.
1478@@ -202,7 +203,7 @@
1479 'The canvas did not get scaled.');
1480
1481 simulate(
1482- this.timeline_graph, '.yui-timelinegraph-zoom-out', 'click');
1483+ this.timeline_graph, '.yui3-timelinegraph-zoom-out', 'click');
1484
1485 canvas = this.content_box.one('canvas');
1486 Assert.areEqual(1, this.timeline_graph.graph_scale);
1487
1488=== modified file 'lib/lp/registry/templates/distributionsourcepackage-index.pt'
1489--- lib/lp/registry/templates/distributionsourcepackage-index.pt 2010-11-17 00:21:51 +0000
1490+++ lib/lp/registry/templates/distributionsourcepackage-index.pt 2010-12-01 21:32:51 +0000
1491@@ -231,10 +231,7 @@
1492 </p>
1493 </div>
1494 <script type="text/javascript">
1495-YUI({
1496- base: '../../lib/yui/current/build/',
1497- filter: 'raw'
1498- }).use('node', 'event', 'lazr.effects', function(Y) {
1499+ LPS.use('node', 'event', 'lazr.effects', function(Y) {
1500
1501 // XXX Michael Nelson 20090702 bug=340497 This slider
1502 // needs an integration test.
1503
1504=== modified file 'lib/lp/registry/templates/product-index.pt'
1505--- lib/lp/registry/templates/product-index.pt 2010-10-25 14:59:48 +0000
1506+++ lib/lp/registry/templates/product-index.pt 2010-12-01 21:32:51 +0000
1507@@ -34,7 +34,7 @@
1508
1509 <script type="text/javascript"
1510 tal:content="string:
1511- YUI().use('lp.registry.pillar', function(Y) {
1512+ LPS.use('lp.registry.pillar', function(Y) {
1513 Y.on('load',
1514 function(e) {
1515 Y.lp.registry.pillar.activate_collapsible_div();
1516
1517=== modified file 'lib/lp/registry/templates/productseries-setbranch.pt'
1518--- lib/lp/registry/templates/productseries-setbranch.pt 2010-04-01 18:17:05 +0000
1519+++ lib/lp/registry/templates/productseries-setbranch.pt 2010-12-01 21:32:51 +0000
1520@@ -119,7 +119,7 @@
1521 </div>
1522
1523 <script type="text/javascript">
1524- YUI().use('lp.code.productseries_setbranch', function(Y) {
1525+ LPS.use('lp.code.productseries_setbranch', function(Y) {
1526 Y.on('domready', Y.lp.code.productseries_setbranch.setup);
1527 });
1528 </script>
1529
1530=== modified file 'lib/lp/registry/templates/team-portlet-membership.pt'
1531--- lib/lp/registry/templates/team-portlet-membership.pt 2010-04-29 15:21:05 +0000
1532+++ lib/lp/registry/templates/team-portlet-membership.pt 2010-12-01 21:32:51 +0000
1533@@ -105,7 +105,7 @@
1534 tal:condition="link/enabled">
1535 <script type="text/javascript"
1536 tal:content="string:
1537- YUI().use('lp.registry.team', function(Y) {
1538+ LPS.use('lp.registry.team', function(Y) {
1539 Y.on('load',
1540 function(e) {
1541 Y.lp.registry.team.setup_add_member_handler();
1542
1543=== modified file 'lib/lp/soyuz/javascript/tests/archivesubscribers_index.js'
1544--- lib/lp/soyuz/javascript/tests/archivesubscribers_index.js 2010-08-10 09:54:13 +0000
1545+++ lib/lp/soyuz/javascript/tests/archivesubscribers_index.js 2010-12-01 21:32:51 +0000
1546@@ -4,7 +4,8 @@
1547 YUI({
1548 base: '../../../../canonical/launchpad/icing/yui/',
1549 filter: 'raw',
1550- combine: false
1551+ combine: false,
1552+ fetchCSS: false
1553 }).use(
1554 'test', 'console', 'lp.soyuz.archivesubscribers_index', function(Y) {
1555
1556
1557=== modified file 'lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js'
1558--- lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js 2010-08-10 10:40:02 +0000
1559+++ lib/lp/soyuz/javascript/tests/lp_dynamic_dom_updater.js 2010-12-01 21:32:51 +0000
1560@@ -4,7 +4,8 @@
1561 YUI({
1562 base: '../../../../canonical/launchpad/icing/yui/',
1563 filter: 'raw',
1564- combine: false
1565+ combine: false,
1566+ fetchCSS: false
1567 }).use('test', 'console', 'lp.soyuz.dynamic_dom_updater', function(Y) {
1568
1569 var Assert = Y.Assert; // For easy access to isTrue(), etc.
1570
1571=== modified file 'lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html'
1572--- lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html 2010-08-10 09:32:38 +0000
1573+++ lib/lp/soyuz/javascript/tests/test_archivesubscribers_index.html 2010-12-01 21:32:51 +0000
1574@@ -16,7 +16,7 @@
1575 <!-- The test suite -->
1576 <script type="text/javascript" src="archivesubscribers_index.js"></script>
1577 </head>
1578-<body class="yui-skin-sam">
1579+<body class="yui3-skin-sam">
1580 <h1>Testing the ArchiveSubscribersIndex javascript</h1>
1581
1582 <h2>Errors</h2>
1583
1584=== modified file 'lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html'
1585--- lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html 2010-08-10 09:32:38 +0000
1586+++ lib/lp/soyuz/javascript/tests/test_lp_dynamic_dom_updater.html 2010-12-01 21:32:51 +0000
1587@@ -16,7 +16,7 @@
1588 <!-- The test suite -->
1589 <script type="text/javascript" src="lp_dynamic_dom_updater.js"></script>
1590 </head>
1591-<body class="yui-skin-sam">
1592+<body class="yui3-skin-sam">
1593 <div id="lp_dynamic_dom_updater_example">
1594 </div>
1595 <div id="log"></div>
1596
1597=== modified file 'lib/lp/soyuz/templates/archive-index.pt'
1598--- lib/lp/soyuz/templates/archive-index.pt 2010-07-29 22:01:51 +0000
1599+++ lib/lp/soyuz/templates/archive-index.pt 2010-12-01 21:32:51 +0000
1600@@ -150,10 +150,7 @@
1601 >Celso Providelo</a>.</p>
1602
1603 <script type="text/javascript">
1604-YUI({
1605- base: '../../lib/yui/current/build/',
1606- filter: 'raw'
1607- }).use('node', 'event', 'lazr.effects', function(Y) {
1608+ LPS.use('node', 'event', 'lazr.effects', function(Y) {
1609
1610 // Hide the widget body contents.
1611 Y.one('#ppa-install .widget-body').addClass('lazr-closed');
1612
1613=== modified file 'lib/lp/testing/__init__.py'
1614--- lib/lp/testing/__init__.py 2010-12-01 12:00:00 +0000
1615+++ lib/lp/testing/__init__.py 2010-12-01 21:32:51 +0000
1616@@ -762,16 +762,17 @@
1617 client = self.client
1618 client.open(url=yui_runner_url)
1619 client.waits.forPageLoad(timeout=constants.PAGE_LOAD)
1620- client.waits.forElement(id='complete')
1621+ # This is very fragile for some reason, so we need a long delay here.
1622+ client.waits.forElement(id='complete', timeout=constants.PAGE_LOAD)
1623 response = client.commands.getPageText()
1624 self._yui_results = {}
1625 # Maybe testing.pages should move to lp to avoid circular imports.
1626 from canonical.launchpad.testing.pages import find_tags_by_class
1627 entries = find_tags_by_class(
1628- response['result'], 'yui-console-entry-TestRunner')
1629+ response['result'], 'yui3-console-entry-TestRunner')
1630 for entry in entries:
1631 category = entry.find(
1632- attrs={'class': 'yui-console-entry-cat'})
1633+ attrs={'class': 'yui3-console-entry-cat'})
1634 if category is None:
1635 continue
1636 result = category.string
1637
1638=== modified file 'lib/lp/translations/templates/languageset-index.pt'
1639--- lib/lp/translations/templates/languageset-index.pt 2010-08-20 00:39:54 +0000
1640+++ lib/lp/translations/templates/languageset-index.pt 2010-12-01 21:32:51 +0000
1641@@ -14,7 +14,7 @@
1642 tal:attributes="src string:${icingroot}/build/worlddata/languages.js">
1643 </script>
1644 <script type="text/javascript">
1645- YUI().use('languages', 'event', function(Y) {
1646+ LPS.use('languages', 'event', function(Y) {
1647 Y.on('domready', function(e) {
1648 Y.languages.initialize_languages_page(Y);
1649 });
1650
1651=== modified file 'utilities/yui-deps.py'
1652--- utilities/yui-deps.py 2009-07-17 00:26:05 +0000
1653+++ utilities/yui-deps.py 2010-12-01 21:32:51 +0000
1654@@ -47,7 +47,12 @@
1655 if not match:
1656 continue
1657 # We want to bundle the minimized version
1658- module = os.path.join(yui_root, match.group(1)) + '-min.js'
1659+ # unless it's a lang module.
1660+ file_path = match.group(1)
1661+ if 'lang' in file_path:
1662+ module = os.path.join(yui_root, match.group(1)) + '.js'
1663+ else:
1664+ module = os.path.join(yui_root, match.group(1)) + '-min.js'
1665 if not os.path.isfile(module):
1666 sys.stderr.write(
1667 "Found invalid YUI module: %s\n" % module)
1668
1669=== modified file 'versions.cfg'
1670--- versions.cfg 2010-12-01 21:32:45 +0000
1671+++ versions.cfg 2010-12-01 21:32:51 +0000
1672@@ -36,7 +36,7 @@
1673 lazr.smtptest = 1.1
1674 lazr.testing = 0.1.1
1675 lazr.uri = 1.0.2
1676-lazr-js = 1.5DEV-r188
1677+lazr-js = 1.5DEV-r191
1678 manuel = 1.1.1
1679 martian = 0.11
1680 mechanize = 0.1.11