Merge ~cjwatson/launchpad:dsd-rename-blacklist into launchpad:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: cd6b0e1e2beb5f59bcae1f66247d1bc64e971d5a
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/launchpad:dsd-rename-blacklist
Merge into: launchpad:master
Diff against target: 1258 lines (+205/-205)
15 files modified
lib/lp/registry/browser/distroseries.py (+1/-1)
lib/lp/registry/browser/distroseriesdifference.py (+22/-22)
lib/lp/registry/browser/tests/test_distroseries.py (+10/-10)
lib/lp/registry/browser/tests/test_distroseriesdifference_views.py (+27/-27)
lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py (+3/-3)
lib/lp/registry/enums.py (+2/-2)
lib/lp/registry/interfaces/distroseriesdifference.py (+2/-2)
lib/lp/registry/javascript/distroseriesdifferences_details.js (+38/-38)
lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html (+17/-17)
lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js (+42/-42)
lib/lp/registry/model/distroseriesdifference.py (+12/-12)
lib/lp/registry/templates/distroseries-localdifferences.pt (+1/-1)
lib/lp/registry/templates/distroseriesdifference-listing-extra.pt (+2/-2)
lib/lp/registry/tests/test_distroseriesdifference.py (+22/-22)
lib/lp/soyuz/tests/test_distroseriesdifferencejob.py (+4/-4)
Reviewer Review Type Date Requested Status
Jürgen Gmach Approve
Review via email: mp+438344@code.launchpad.net

Commit message

Rename "blacklist" to "blocklist" for DistroSeriesDifferences

Description of the change

Normally we'd need to take a bit more care than this, because renaming HTML fields means that users may have problems if they load a form before the upgrade and attempt to submit it after the upgrade. However, this UI machinery is sufficiently rarely used that I don't think it's worth bothering with anything more careful.

To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lib/lp/registry/browser/distroseries.py b/lib/lp/registry/browser/distroseries.py
2index d9ca04f..5782b54 100644
3--- a/lib/lp/registry/browser/distroseries.py
4+++ b/lib/lp/registry/browser/distroseries.py
5@@ -1258,7 +1258,7 @@ class DistroSeriesDifferenceBaseView(
6 package_type_dsd_status = {
7 NON_IGNORED: DistroSeriesDifferenceStatus.NEEDS_ATTENTION,
8 HIGHER_VERSION_THAN_PARENT: (
9- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
10+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
11 ),
12 RESOLVED: DistroSeriesDifferenceStatus.RESOLVED,
13 ALL: None,
14diff --git a/lib/lp/registry/browser/distroseriesdifference.py b/lib/lp/registry/browser/distroseriesdifference.py
15index 0243d64..795f116 100644
16--- a/lib/lp/registry/browser/distroseriesdifference.py
17+++ b/lib/lp/registry/browser/distroseriesdifference.py
18@@ -82,18 +82,18 @@ class DistroSeriesDifferenceNavigation(Navigation):
19 class IDistroSeriesDifferenceForm(Interface):
20 """An interface used in the browser only for displaying form elements."""
21
22- blacklist_options = Choice(
23+ blocklist_options = Choice(
24 vocabulary=SimpleVocabulary(
25 (
26 SimpleTerm("NONE", "NONE", "No"),
27 SimpleTerm(
28- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
29- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS.name,
30+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
31+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS.name,
32 "All versions",
33 ),
34 SimpleTerm(
35- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
36- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT.name,
37+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
38+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT.name,
39 "These versions",
40 ),
41 )
42@@ -104,19 +104,19 @@ class IDistroSeriesDifferenceForm(Interface):
43 @implementer(IConversation)
44 class DistroSeriesDifferenceView(LaunchpadFormView):
45 schema = IDistroSeriesDifferenceForm
46- custom_widget_blacklist_options = RadioWidget
47+ custom_widget_blocklist_options = RadioWidget
48
49 @property
50 def initial_values(self):
51- """Ensure the correct radio button is checked for blacklisting."""
52- blacklisted_statuses = (
53- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
54- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
55+ """Ensure the correct radio button is checked for blocklisting."""
56+ blocklisted_statuses = (
57+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
58+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
59 )
60- if self.context.status in blacklisted_statuses:
61- return dict(blacklist_options=self.context.status)
62+ if self.context.status in blocklisted_statuses:
63+ return dict(blocklist_options=self.context.status)
64
65- return dict(blacklist_options="NONE")
66+ return dict(blocklist_options="NONE")
67
68 @property
69 def binary_summaries(self):
70@@ -156,8 +156,8 @@ class DistroSeriesDifferenceView(LaunchpadFormView):
71 return self.request.is_ajax and self.can_request_diffs
72
73 @cachedproperty
74- def enable_blacklist_options(self):
75- """Should we enable the blacklisting (ignore) radio widget options.
76+ def enable_blocklist_options(self):
77+ """Should we enable the blocklisting (ignore) radio widget options.
78
79 Only enable the options if an editor requests via JS and the user
80 is an archive admin.
81@@ -167,15 +167,15 @@ class DistroSeriesDifferenceView(LaunchpadFormView):
82 )
83
84 @cachedproperty
85- def blacklist_options_css_class(self):
86- """The css class for the blacklist option slot.
87- 'blacklist-options' if enabled.
88- 'blacklist-options-disabled' if not enabled.
89+ def blocklist_options_css_class(self):
90+ """The css class for the blocklist option slot.
91+ 'blocklist-options' if enabled.
92+ 'blocklist-options-disabled' if not enabled.
93 """
94- if self.enable_blacklist_options:
95- return "blacklist-options"
96+ if self.enable_blocklist_options:
97+ return "blocklist-options"
98 else:
99- return "blacklist-options-disabled"
100+ return "blocklist-options-disabled"
101
102 @property
103 def display_diffs(self):
104diff --git a/lib/lp/registry/browser/tests/test_distroseries.py b/lib/lp/registry/browser/tests/test_distroseries.py
105index 0e8c409..1a344fa 100644
106--- a/lib/lp/registry/browser/tests/test_distroseries.py
107+++ b/lib/lp/registry/browser/tests/test_distroseries.py
108@@ -1627,7 +1627,7 @@ class TestDistroSeriesLocalDifferences(
109 return jobs[0]
110
111 def test_higher_radio_mentions_parent(self):
112- # The user is shown an option to display only the blacklisted
113+ # The user is shown an option to display only the blocklisted
114 # package with a higher version than in the parent.
115 derived_series, parent_series = self._createChildAndParent()
116 self.factory.makeDistroSeriesDifference(
117@@ -1700,8 +1700,8 @@ class TestDistroSeriesLocalDifferences(
118 [diff2, diff1], unfiltered_view.cached_differences.batch
119 )
120
121- def test_batch_non_blacklisted(self):
122- # The default filter is all non blacklisted differences.
123+ def test_batch_non_blocklisted(self):
124+ # The default filter is all non blocklisted differences.
125 derived_series, parent_series = self._createChildAndParent()
126 diff1 = self.factory.makeDistroSeriesDifference(
127 derived_series=derived_series,
128@@ -1713,7 +1713,7 @@ class TestDistroSeriesLocalDifferences(
129 )
130 self.factory.makeDistroSeriesDifference(
131 derived_series=derived_series,
132- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
133+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
134 )
135
136 filtered_view = create_initialized_view(
137@@ -1775,12 +1775,12 @@ class TestDistroSeriesLocalDifferences(
138 derived_series, _ = self._createChildAndParent()
139 blocklisted_diff_higher = self.factory.makeDistroSeriesDifference(
140 derived_series=derived_series,
141- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
142+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
143 versions={"base": "1.1", "parent": "1.3", "derived": "1.10"},
144 )
145 self.factory.makeDistroSeriesDifference(
146 derived_series=derived_series,
147- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
148+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
149 versions={"base": "1.1", "parent": "1.12", "derived": "1.10"},
150 )
151
152@@ -2566,11 +2566,11 @@ class DistroSeriesMissingPackageDiffsTestCase(TestCaseWithFactory):
153 derived_series = dsp.derived_series
154
155 missing_type = DistroSeriesDifferenceType.MISSING_FROM_DERIVED_SERIES
156- # Missing blacklisted diff.
157+ # Missing blocklisted diff.
158 self.factory.makeDistroSeriesDifference(
159 difference_type=missing_type,
160 derived_series=derived_series,
161- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
162+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
163 )
164
165 missing_diff = self.factory.makeDistroSeriesDifference(
166@@ -2720,11 +2720,11 @@ class DistroSerieUniquePackageDiffsTestCase(
167 derived_series, parent_series = self._createChildAndParent()
168
169 missing_type = DistroSeriesDifferenceType.UNIQUE_TO_DERIVED_SERIES
170- # Missing blacklisted diff.
171+ # Missing blocklisted diff.
172 self.factory.makeDistroSeriesDifference(
173 difference_type=missing_type,
174 derived_series=derived_series,
175- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
176+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
177 )
178
179 missing_diff = self.factory.makeDistroSeriesDifference(
180diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
181index 0ee9a1a..17a8624 100644
182--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
183+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_views.py
184@@ -178,23 +178,23 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
185 self.assertThat(view(), Not(binary_description_matcher))
186
187 def test_show_edit_options_non_ajax(self):
188- # Blacklist options and "Add comment" are not shown for non-ajax
189+ # Blocklist options and "Add comment" are not shown for non-ajax
190 # requests.
191 ds_diff = self.factory.makeDistroSeriesDifference()
192
193- # Without JS, even editors don't see blacklist options.
194+ # Without JS, even editors don't see blocklist options.
195 with person_logged_in(self.factory.makePerson()):
196 view = create_initialized_view(
197 ds_diff, "+listing-distroseries-extra"
198 )
199 self.assertFalse(view.show_add_comment)
200- self.assertFalse(view.enable_blacklist_options)
201+ self.assertFalse(view.enable_blocklist_options)
202 self.assertEqual(
203- "blacklist-options-disabled", view.blacklist_options_css_class
204+ "blocklist-options-disabled", view.blocklist_options_css_class
205 )
206
207 def test_show_edit_options_editor(self):
208- # The "Add comment" link is shown and the blacklist options are
209+ # The "Add comment" link is shown and the blocklist options are
210 # not enabled if requested by an editor via ajax.
211 ds_diff = self.factory.makeDistroSeriesDifference()
212
213@@ -204,13 +204,13 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
214 ds_diff, "+listing-distroseries-extra", request=request
215 )
216 self.assertTrue(view.show_add_comment)
217- self.assertFalse(view.enable_blacklist_options)
218+ self.assertFalse(view.enable_blocklist_options)
219 self.assertEqual(
220- "blacklist-options-disabled", view.blacklist_options_css_class
221+ "blocklist-options-disabled", view.blocklist_options_css_class
222 )
223
224- def test_enable_blacklist_options_for_archive_admin(self):
225- # To see the blacklist options enabled the user needs to be an
226+ def test_enable_blocklist_options_for_archive_admin(self):
227+ # To see the blocklist options enabled the user needs to be an
228 # archive admin.
229 ds_diff = self.factory.makeDistroSeriesDifference()
230 archive_admin = self.factory.makeArchiveAdmin(
231@@ -222,7 +222,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
232 view = create_initialized_view(
233 ds_diff, "+listing-distroseries-extra", request=request
234 )
235- self.assertTrue(view.enable_blacklist_options)
236+ self.assertTrue(view.enable_blocklist_options)
237
238 def test_show_add_comment_non_editor(self):
239 # Even with a JS request, non-editors do not see the 'add
240@@ -610,8 +610,8 @@ class DistroSeriesDifferenceTemplateTestCase(TestCaseWithFactory):
241 view = create_initialized_view(context, view_name, request=request)
242 return view()
243
244- def test_blacklist_options(self):
245- # Blacklist options are presented to the users who are archive
246+ def test_blocklist_options(self):
247+ # Blocklist options are presented to the users who are archive
248 # admins.
249 ds_diff = self.factory.makeDistroSeriesDifference()
250 archive_admin = self.factory.makeArchiveAdmin(
251@@ -623,11 +623,11 @@ class DistroSeriesDifferenceTemplateTestCase(TestCaseWithFactory):
252 soup = BeautifulSoup(view_content)
253
254 self.assertEqual(
255- 1, len(soup.find_all("div", {"class": "blacklist-options"}))
256+ 1, len(soup.find_all("div", {"class": "blocklist-options"}))
257 )
258
259- def test_blacklist_options_disabled(self):
260- # Blacklist options are disabled to the users who are *not* archive
261+ def test_blocklist_options_disabled(self):
262+ # Blocklist options are disabled to the users who are *not* archive
263 # admins.
264 ds_diff = self.factory.makeDistroSeriesDifference()
265 person = self.factory.makePerson()
266@@ -638,37 +638,37 @@ class DistroSeriesDifferenceTemplateTestCase(TestCaseWithFactory):
267
268 self.assertEqual(
269 1,
270- len(soup.find_all("div", {"class": "blacklist-options-disabled"})),
271+ len(soup.find_all("div", {"class": "blocklist-options-disabled"})),
272 )
273
274- def test_blacklist_options_initial_values_none(self):
275+ def test_blocklist_options_initial_values_none(self):
276 ds_diff = self.factory.makeDistroSeriesDifference()
277 view = create_initialized_view(ds_diff, "+listing-distroseries-extra")
278
279- # If the difference is not currently blacklisted, 'NONE' is set
280+ # If the difference is not currently blocklisted, 'NONE' is set
281 # as the default value for the field.
282- self.assertEqual("NONE", view.initial_values.get("blacklist_options"))
283+ self.assertEqual("NONE", view.initial_values.get("blocklist_options"))
284
285- def test_blacklist_options_initial_values_current(self):
286+ def test_blocklist_options_initial_values_current(self):
287 ds_diff = self.factory.makeDistroSeriesDifference(
288- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
289+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
290 )
291 view = create_initialized_view(ds_diff, "+listing-distroseries-extra")
292
293 self.assertEqual(
294- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
295- view.initial_values.get("blacklist_options"),
296+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
297+ view.initial_values.get("blocklist_options"),
298 )
299
300- def test_blacklist_options_initial_values_always(self):
301+ def test_blocklist_options_initial_values_always(self):
302 ds_diff = self.factory.makeDistroSeriesDifference(
303- status=DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
304+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
305 )
306 view = create_initialized_view(ds_diff, "+listing-distroseries-extra")
307
308 self.assertEqual(
309- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
310- view.initial_values.get("blacklist_options"),
311+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
312+ view.initial_values.get("blocklist_options"),
313 )
314
315 def test_package_diff_request_link(self):
316diff --git a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
317index 877af1a..149fc6f 100644
318--- a/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
319+++ b/lib/lp/registry/browser/tests/test_distroseriesdifference_webservice.py
320@@ -51,13 +51,13 @@ class DistroSeriesDifferenceWebServiceTestCase(TestCaseWithFactory):
321 ds_diff.parent_series,
322 )
323 self.assertEqual(
324- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT, ds_diff.status
325+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT, ds_diff.status
326 )
327
328 def test_unblocklist(self):
329 # The unblocklist method can be called by people with admin access.
330 ds_diff = self.factory.makeDistroSeriesDifference(
331- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
332+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
333 )
334 archive_admin = self.factory.makeArchiveAdmin(
335 archive=ds_diff.derived_series.main_archive
336@@ -195,7 +195,7 @@ class DistroSeriesDifferenceWebServiceTestCase(TestCaseWithFactory):
337 def test_exported_status(self):
338 # The difference's status is exposed.
339 ds_diff = self.factory.makeDistroSeriesDifference(
340- status=DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
341+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
342 )
343 ws_diff = ws_object(
344 self.factory.makeLaunchpadService(self.factory.makePerson()),
345diff --git a/lib/lp/registry/enums.py b/lib/lp/registry/enums.py
346index 9340d63..bf50514 100644
347--- a/lib/lp/registry/enums.py
348+++ b/lib/lp/registry/enums.py
349@@ -381,7 +381,7 @@ class DistroSeriesDifferenceStatus(DBEnumeratedType):
350 """,
351 )
352
353- BLACKLISTED_CURRENT = DBItem(
354+ BLOCKLISTED_CURRENT = DBItem(
355 2,
356 """
357 Blocklisted current version
358@@ -391,7 +391,7 @@ class DistroSeriesDifferenceStatus(DBEnumeratedType):
359 """,
360 )
361
362- BLACKLISTED_ALWAYS = DBItem(
363+ BLOCKLISTED_ALWAYS = DBItem(
364 3,
365 """
366 Blocklisted always
367diff --git a/lib/lp/registry/interfaces/distroseriesdifference.py b/lib/lp/registry/interfaces/distroseriesdifference.py
368index 56eefa8..cfe1d5d 100644
369--- a/lib/lp/registry/interfaces/distroseriesdifference.py
370+++ b/lib/lp/registry/interfaces/distroseriesdifference.py
371@@ -296,7 +296,7 @@ class IDistroSeriesDifferencePublic(Interface):
372 the same) then the status is updated to RESOLVED.
373
374 :param manual: Boolean, True if this is a user-requested change.
375- This overrides auto-blacklisting.
376+ This overrides auto-blocklisting.
377 :return: True if the record was updated, False otherwise.
378 """
379
380@@ -464,5 +464,5 @@ class IDistroSeriesDifferenceSource(Interface):
381 These are `DistroSeriesDifferences` where the parent has been
382 updated and the child still has the old version, unchanged.
383
384- Blacklisted items are excluded.
385+ Blocklisted items are excluded.
386 """
387diff --git a/lib/lp/registry/javascript/distroseriesdifferences_details.js b/lib/lp/registry/javascript/distroseriesdifferences_details.js
388index 10b0610..74629a0 100644
389--- a/lib/lp/registry/javascript/distroseriesdifferences_details.js
390+++ b/lib/lp/registry/javascript/distroseriesdifferences_details.js
391@@ -101,28 +101,28 @@ Y.extend(ExpandableRowWidget, Y.Base, {
392 apiUri: api_uri});
393 comment_widget.render(add_comment_placeholder);
394 }
395- // The blacklist slot with a class 'blacklist-options' is only
396- // available when the user has the right to blacklist.
397- var blacklist_slot = container.one('div.blacklist-options');
398+ // The blocklist slot with a class 'blocklist-options' is only
399+ // available when the user has the right to blocklist.
400+ var blocklist_slot = container.one('div.blocklist-options');
401
402- if (blacklist_slot !== null) {
403+ if (blocklist_slot !== null) {
404 // XXX the structure of these widgets means they
405 // are creating side effects on new, but still return
406 // undefined, so can't be used as variables.
407 // eslint-disable-next-line no-new
408- new BlacklistWidget(
409- {srcNode: blacklist_slot,
410+ new BlocklistWidget(
411+ {srcNode: blocklist_slot,
412 sourceName: source_name,
413 dsdLink: api_uri,
414 commentWidget: comment_widget
415 });
416 }
417- // If the user has not the right to blacklist, we disable
418- // the blacklist slot.
419- var disabled_blacklist_slot = container.one(
420- 'div.blacklist-options-disabled');
421- if (disabled_blacklist_slot !== null) {
422- disabled_blacklist_slot
423+ // If the user has not the right to blocklist, we disable
424+ // the blocklist slot.
425+ var disabled_blocklist_slot = container.one(
426+ 'div.blocklist-options-disabled');
427+ if (disabled_blocklist_slot !== null) {
428+ disabled_blocklist_slot
429 .all('input').set('disabled', 'disabled');
430 }
431 // Set-up diffs and the means to request them.
432@@ -200,16 +200,16 @@ Y.extend(ExpandableRowWidget, Y.Base, {
433 namespace.ExpandableRowWidget = ExpandableRowWidget;
434
435 /**
436- * BlacklistWidget: the widget used by each row to control the
437- * 'blacklisted' status of the DSD.
438+ * BlocklistWidget: the widget used by each row to control the
439+ * 'blocklisted' status of the DSD.
440 */
441-function BlacklistWidget(config) {
442- BlacklistWidget.superclass.constructor.apply(this, arguments);
443+function BlocklistWidget(config) {
444+ BlocklistWidget.superclass.constructor.apply(this, arguments);
445 }
446
447-BlacklistWidget.NAME = "blacklistWidget";
448+BlocklistWidget.NAME = "blocklistWidget";
449
450-BlacklistWidget.HTML_PARSER = {
451+BlocklistWidget.HTML_PARSER = {
452 relatedRows: function(srcNode) {
453 return [
454 srcNode.ancestor('tr').previous(),
455@@ -218,14 +218,14 @@ BlacklistWidget.HTML_PARSER = {
456 }
457 };
458
459-Y.extend(BlacklistWidget, Y.Widget, {
460+Y.extend(BlocklistWidget, Y.Widget, {
461 initializer: function(cfg) {
462 this.sourceName = cfg.sourceName;
463 this.dsdLink = cfg.dsdLink;
464 this.commentWidget = cfg.commentWidget;
465 this.relatedRows = cfg.relatedRows;
466 this.container = cfg.container;
467- // We call bindUI directly here because the BlacklistWidgets
468+ // We call bindUI directly here because the BlocklistWidgets
469 // are built from existing HTML code and hence we don't
470 // use the full potential of YUI'Widget to manage the
471 // display of the widgets.
472@@ -238,7 +238,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
473 *
474 */
475 bindUI: function() {
476- // Wire the click on blacklist form.
477+ // Wire the click on blocklist form.
478 var handleClick = function(e) {
479 e.preventDefault();
480 var target = e.target;
481@@ -247,13 +247,13 @@ Y.extend(BlacklistWidget, Y.Widget, {
482 Y.on("click", handleClick, this.get('srcNode').all('input'), this);
483
484 // Wire the ok event from the comment overlay.
485- var handleBlacklistChange = function(e, method_name, blacklist_all,
486+ var handleBlocklistChange = function(e, method_name, blocklist_all,
487 comment, target) {
488 e.preventDefault();
489- this.blacklist_submit_handler(
490- method_name, blacklist_all, comment, target);
491+ this.blocklist_submit_handler(
492+ method_name, blocklist_all, comment, target);
493 };
494- this.on("blacklist_changed", handleBlacklistChange,
495+ this.on("blocklist_changed", handleBlocklistChange,
496 this);
497 },
498
499@@ -291,16 +291,16 @@ Y.extend(BlacklistWidget, Y.Widget, {
500 var value = target.get('value');
501 var method_name = (value === 'NONE') ?
502 'unblocklist' : 'blocklist';
503- var blacklist_all = (
504- target.get('value') === 'BLACKLISTED_ALWAYS');
505+ var blocklist_all = (
506+ target.get('value') === 'BLOCKLISTED_ALWAYS');
507 self.fire(
508- 'blacklist_changed', method_name, blacklist_all, comment,
509+ 'blocklist_changed', method_name, blocklist_all, comment,
510 target);
511 };
512 var overlay = new Y.lp.ui.FormOverlay({
513 align: {
514 /* Align the centre of the overlay with the centre of the
515- node containing the blacklist options. */
516+ node containing the blocklist options. */
517 node: this.get('srcNode'),
518 points: [
519 Y.WidgetPositionAlign.CC,
520@@ -341,7 +341,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
521 this.get('srcNode').all('input').set('disabled', false);
522 },
523
524- // Duration of the animation fired after each blacklist status change.
525+ // Duration of the animation fired after each blocklist status change.
526 ANIM_DURATION: 1,
527
528 /**
529@@ -350,15 +350,15 @@ Y.extend(BlacklistWidget, Y.Widget, {
530 *
531 * @param method_name {String}
532 * 'blocklist' or 'unblocklist'.
533- * @param blacklist_all {Boolean}
534- * Is this a blacklist all versions or blacklist current (only
535- * relevant if method_name is 'blacklist').
536+ * @param blocklist_all {Boolean}
537+ * Is this a blocklist all versions or blocklist current (only
538+ * relevant if method_name is 'blocklist').
539 * @param comment {String}
540 * The comment string.
541 * @param target {Node}
542 * The target input node that was clicked.
543 */
544- blacklist_submit_handler: function(method_name, blacklist_all, comment,
545+ blocklist_submit_handler: function(method_name, blocklist_all, comment,
546 target) {
547 var self = this;
548 this.lock();
549@@ -368,7 +368,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
550 on: {
551 success: function(updated_entry, args) {
552 self.unlock();
553- // Let the user know this item is now blacklisted.
554+ // Let the user know this item is now blocklisted.
555 target.set('checked', true);
556 Y.each(diff_rows, function(diff_row) {
557 var fade_to_gray = new Y.Anim({
558@@ -379,7 +379,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
559 reverse: (method_name === 'unblocklist')
560 });
561 fade_to_gray.on('end', function() {
562- self.fire('blacklisting_animation_ended');
563+ self.fire('blocklisting_animation_ended');
564 });
565 fade_to_gray.run();
566 });
567@@ -392,7 +392,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
568 }
569 },
570 parameters: {
571- all: blacklist_all,
572+ all: blocklist_all,
573 comment: comment
574 }
575 };
576@@ -400,7 +400,7 @@ Y.extend(BlacklistWidget, Y.Widget, {
577 }
578 });
579
580-namespace.BlacklistWidget = BlacklistWidget;
581+namespace.BlocklistWidget = BlocklistWidget;
582
583 /**
584 * Update the latest comment on the difference row.
585diff --git a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html
586index 05d4a22..a1af494 100644
587--- a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html
588+++ b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.html
589@@ -92,35 +92,35 @@ GNU Affero General Public License version 3 (see the file LICENSE).
590 </tr>
591 </script>
592
593- <script type="text/x-template" id="blacklist_html">
594- <div class="blacklist-options" style="float:left">
595+ <script type="text/x-template" id="blocklist_html">
596+ <div class="blocklist-options" style="float:left">
597 <dl>
598 <dt>Ignored:</dt>
599 <dd>
600 <form>
601 <div>
602 <div class="value">
603- <label for="field.blacklist_options.0">
604+ <label for="field.blocklist_options.0">
605 <input type="radio" value="NONE"
606- name="field.blacklist_options"
607- id="field.blacklist_options.0" checked="checked"
608+ name="field.blocklist_options"
609+ id="field.blocklist_options.0" checked="checked"
610 class="radioType">&nbsp;No</input>
611 </label><br>
612- <label for="field.blacklist_options.1">
613- <input type="radio" value="BLACKLISTED_ALWAYS"
614- name="field.blacklist_options"
615- id="field.blacklist_options.1" class="radioType">
616+ <label for="field.blocklist_options.1">
617+ <input type="radio" value="BLOCKLISTED_ALWAYS"
618+ name="field.blocklist_options"
619+ id="field.blocklist_options.1" class="radioType">
620 &nbsp;All versions</input>
621 </label><br>
622- <label for="field.blacklist_options.2">
623- <input type="radio" value="BLACKLISTED_CURRENT"
624- name="field.blacklist_options"
625- id="field.blacklist_options.2"
626+ <label for="field.blocklist_options.2">
627+ <input type="radio" value="BLOCKLISTED_CURRENT"
628+ name="field.blocklist_options"
629+ id="field.blocklist_options.2"
630 class="radioType">&nbsp;These versions</input>
631 </label>
632 </div>
633 <input type="hidden" value="1"
634- name="field.blacklist_options-empty-marker" />
635+ name="field.blocklist_options-empty-marker" />
636 </div>
637 </form>
638 </dd>
639@@ -128,7 +128,7 @@ GNU Affero General Public License version 3 (see the file LICENSE).
640 </div>
641 </script>
642
643- <script type="text/x-template" id="blacklist_extra_row">
644+ <script type="text/x-template" id="blocklist_extra_row">
645 <tr id="extra_row">
646 <td>
647 <div class="diff-extra-container">
648@@ -156,7 +156,7 @@ GNU Affero General Public License version 3 (see the file LICENSE).
649 </dd>
650 </dl>
651 </div>
652- {blacklist_html}
653+ {blocklist_html}
654 <div class="boardComment ">
655 <div class="boardCommentDetails">
656 <a class="sprite person" href="/~mark">Mark S.</a>
657@@ -172,7 +172,7 @@ GNU Affero General Public License version 3 (see the file LICENSE).
658 </td>
659 </tr>
660 </script>
661- <script type="text/x-template" id="blacklist_whole_table">
662+ <script type="text/x-template" id="blocklist_whole_table">
663 <table class="listing">
664 <tbody>
665 {row}
666diff --git a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
667index 341b3b0..70f0b3e 100644
668--- a/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
669+++ b/lib/lp/registry/javascript/tests/test_distroseriesdifferences_details.js
670@@ -67,12 +67,12 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
671 var dsd_uri = '/duntu/dwarty/+source/evolution/+difference/ubuntu/warty';
672 var row_html = Y.one('#localpackagediffs-template').getContent();
673 var derivedtd_html = Y.one('#derivedtd-template').getContent();
674- var blacklist_html = Y.one('#blacklist_html').getContent();
675- var extra_row = Y.one('#blacklist_extra_row').getContent();
676+ var blocklist_html = Y.one('#blocklist_html').getContent();
677+ var extra_row = Y.one('#blocklist_extra_row').getContent();
678 extra_row = Y.Lang.sub(extra_row, {
679- blacklist_html: blacklist_html
680+ blocklist_html: blocklist_html
681 });
682- var whole_table = Y.one('#blacklist_whole_table').getContent();
683+ var whole_table = Y.one('#blocklist_whole_table').getContent();
684 whole_table = Y.Lang.sub(whole_table, {
685 row: create_row('evolution', '2.0.9-1', '2.0.8-4', false),
686 extra_row: extra_row
687@@ -188,9 +188,9 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
688 name: 'package-diff-update-interaction',
689 setUp: function() {
690 Y.one("#placeholder").append(Y.Node.create(whole_table));
691- this.node = Y.one('.blacklist-options');
692+ this.node = Y.one('.blocklist-options');
693 this.commentWidget = null;
694- this.widget = new module.BlacklistWidget({
695+ this.widget = new module.BlocklistWidget({
696 srcNode: this.node,
697 sourceName: 'evolution',
698 dsdLink: '/a/link',
699@@ -213,13 +213,13 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
700 assertIsLocked: function() {
701 var node = this.widget.get('srcNode');
702 Y.Assert.isNotNull(node.one('img[src="/@@/spinner"]'));
703- assertAllDisabled(node, 'div.blacklist-options input');
704+ assertAllDisabled(node, 'div.blocklist-options input');
705 },
706
707 assertIsUnlocked: function() {
708 var node = this.widget.get('srcNode');
709 Y.Assert.isNull(node.one('img[src="/@@/spinner"]'));
710- assertAllEnabled(node, 'div.blacklist-options input');
711+ assertAllEnabled(node, 'div.blocklist-options input');
712 },
713
714 test_lock: function() {
715@@ -261,9 +261,9 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
716 Y.Assert.areEqual(this.commentWidget, this.widget.commentWidget);
717 },
718
719- test_wire_blacklist_click: function() {
720+ test_wire_blocklist_click: function() {
721 var input = Y.one(
722- 'div.blacklist-options input[value="BLACKLISTED_CURRENT"]');
723+ 'div.blocklist-options input[value="BLOCKLISTED_CURRENT"]');
724 var fired = false;
725
726 var show_comment_overlay = function(target) {
727@@ -276,18 +276,18 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
728 Y.Assert.isTrue(fired);
729 },
730
731- test_wire_blacklist_changed: function() {
732+ test_wire_blocklist_changed: function() {
733 var fired = false;
734
735- var blacklist_submit_handler = function(arg1, arg2, arg3, arg4) {
736+ var blocklist_submit_handler = function(arg1, arg2, arg3, arg4) {
737 fired = true;
738 Y.Assert.areEqual(1, arg1);
739 Y.Assert.areEqual(2, arg2);
740 Y.Assert.areEqual(3, arg3);
741 Y.Assert.areEqual(4, arg4);
742 };
743- this.widget.blacklist_submit_handler = blacklist_submit_handler;
744- this.widget.fire('blacklist_changed', 1, 2, 3, 4);
745+ this.widget.blocklist_submit_handler = blocklist_submit_handler;
746+ this.widget.fire('blocklist_changed', 1, 2, 3, 4);
747 Y.Assert.isTrue(fired);
748 },
749
750@@ -297,7 +297,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
751 },
752
753 test_show_comment_overlay_creates_overlay: function() {
754- var input = Y.one('div.blacklist-options input');
755+ var input = Y.one('div.blocklist-options input');
756 var overlay = this.widget.show_comment_overlay(input);
757 // Check overlay's structure.
758 Y.Assert.isInstanceOf(Y.lp.ui.FormOverlay, overlay);
759@@ -312,7 +312,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
760 },
761
762 test_show_comment_overlay_cancel_hides_overlay: function() {
763- var input = Y.one('div.blacklist-options input');
764+ var input = Y.one('div.blocklist-options input');
765 var overlay = this.widget.show_comment_overlay(input);
766 var cancel_button = overlay.form_node.one('button[type="button"]');
767 Y.Assert.isTrue(overlay.get('visible'));
768@@ -321,7 +321,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
769 },
770
771 test_show_comment_overlay_ok_hides_overlay: function() {
772- var input = Y.one('div.blacklist-options input');
773+ var input = Y.one('div.blocklist-options input');
774 var overlay = this.widget.show_comment_overlay(input);
775 Y.Assert.isTrue(overlay.get('visible'));
776 overlay.form_node.one('button[type="submit"]').simulate('click');
777@@ -329,7 +329,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
778 },
779
780 test_show_comment_overlay_fires_event: function() {
781- var input = Y.one('div.blacklist-options input[value="NONE"]');
782+ var input = Y.one('div.blocklist-options input[value="NONE"]');
783 input.set('checked', true);
784 var overlay = this.widget.show_comment_overlay(input);
785 var event_fired = false;
786@@ -347,7 +347,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
787 target = e_target;
788 };
789
790- this.widget.on("blacklist_changed", handleEvent, this.widget);
791+ this.widget.on("blocklist_changed", handleEvent, this.widget);
792
793 overlay.form_node.one('textarea').set('text', 'Test comment');
794 overlay.form_node.one('button[type="submit"]').simulate('click');
795@@ -359,9 +359,9 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
796 Y.Assert.areEqual(input, target);
797 },
798
799- test_show_comment_overlay_fires_event_blacklist_all: function() {
800+ test_show_comment_overlay_fires_event_blocklist_all: function() {
801 var input = Y.one(
802- 'div.blacklist-options input[value="BLACKLISTED_ALWAYS"]');
803+ 'div.blocklist-options input[value="BLOCKLISTED_ALWAYS"]');
804 input.set('checked', true);
805 var overlay = this.widget.show_comment_overlay(input);
806 var method = null;
807@@ -374,7 +374,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
808 all = e_all;
809 target = e_target;
810 };
811- this.widget.on("blacklist_changed", handleEvent, this.widget);
812+ this.widget.on("blocklist_changed", handleEvent, this.widget);
813 overlay.form_node.one('button[type="submit"]').simulate('click');
814
815 Y.Assert.areEqual('blocklist', method);
816@@ -382,9 +382,9 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
817 Y.Assert.areEqual(input, target);
818 },
819
820- test_show_comment_overlay_fires_event_blacklist: function() {
821+ test_show_comment_overlay_fires_event_blocklist: function() {
822 var input = Y.one(
823- 'div.blacklist-options input[value="BLACKLISTED_CURRENT"]');
824+ 'div.blocklist-options input[value="BLOCKLISTED_CURRENT"]');
825 input.set('checked', true);
826 var overlay = this.widget.show_comment_overlay(input);
827 var method = null;
828@@ -397,7 +397,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
829 all = e_all;
830 target = e_target;
831 };
832- this.widget.on("blacklist_changed", handleEvent, this.widget);
833+ this.widget.on("blocklist_changed", handleEvent, this.widget);
834 overlay.form_node.one('button[type="submit"]').simulate('click');
835
836 Y.Assert.areEqual('blocklist', method);
837@@ -405,16 +405,16 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
838 Y.Assert.areEqual(input, target);
839 },
840
841- test_blacklist_submit_handler_null_comment_widget: function() {
842+ test_blocklist_submit_handler_null_comment_widget: function() {
843 // The widget can cope with a null commentWidget.
844 Y.Assert.isNull(this.widget.commentWidget);
845 var input = Y.one(
846- 'div.blacklist-options input[value="BLACKLISTED_CURRENT"]');
847- this.widget.blacklist_submit_handler(
848+ 'div.blocklist-options input[value="BLOCKLISTED_CURRENT"]');
849+ this.widget.blocklist_submit_handler(
850 'blocklist', false, "Test comment", input);
851 },
852
853- test_blacklist_submit_handler_blacklist_simple: function() {
854+ test_blocklist_submit_handler_blocklist_simple: function() {
855 var mockCommentWidget = Y.Mock();
856 Y.Mock.expect(mockCommentWidget, {
857 method: "display_new_comment",
858@@ -426,7 +426,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
859 'blocklist',
860 {comment: 'Test comment', all: false});
861 var input = Y.one(
862- 'div.blacklist-options input[value="BLACKLISTED_CURRENT"]');
863+ 'div.blocklist-options input[value="BLOCKLISTED_CURRENT"]');
864 input.set('checked', false);
865
866 var fired = 0;
867@@ -436,8 +436,8 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
868 // we had the chance to call this.wait().
869 fired += 1;
870 };
871- this.widget.on('blacklisting_animation_ended', listener);
872- this.widget.blacklist_submit_handler(
873+ this.widget.on('blocklisting_animation_ended', listener);
874+ this.widget.blocklist_submit_handler(
875 'blocklist', false, "Test comment", input);
876
877 Y.Assert.isTrue(input.get('checked'));
878@@ -448,7 +448,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
879 }, 1000);
880 },
881
882- test_blacklist_submit_handler_blacklist_all: function() {
883+ test_blocklist_submit_handler_blocklist_all: function() {
884 var mockCommentWidget = Y.Mock();
885 Y.Mock.expect(mockCommentWidget, {
886 method: "display_new_comment",
887@@ -460,7 +460,7 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
888 'blocklist',
889 {comment: 'Test comment', all: true});
890 var input = Y.one(
891- 'div.blacklist-options input[value="BLACKLISTED_CURRENT"]');
892+ 'div.blocklist-options input[value="BLOCKLISTED_CURRENT"]');
893 input.set('checked', false);
894
895 var fired = 0;
896@@ -470,8 +470,8 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
897 // we had the chance to call this.wait().
898 fired += 1;
899 };
900- this.widget.on('blacklisting_animation_ended', listener);
901- this.widget.blacklist_submit_handler(
902+ this.widget.on('blocklisting_animation_ended', listener);
903+ this.widget.blocklist_submit_handler(
904 'blocklist', true, "Test comment", input);
905
906 Y.Assert.isTrue(input.get('checked'));
907@@ -497,15 +497,15 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
908 all: true
909 });
910
911- var input = Y.one('div.blacklist-options input[value="NONE"]');
912+ var input = Y.one('div.blocklist-options input[value="NONE"]');
913 input.set('checked', false);
914
915 var listener = function (ev) {
916 fired = true;
917 };
918
919- this.widget.on('blacklisting_animation_ended', listener);
920- this.widget.blacklist_submit_handler(
921+ this.widget.on('blocklisting_animation_ended', listener);
922+ this.widget.blocklist_submit_handler(
923 'unblocklist', true, "Test comment", input);
924
925 Y.Assert.isTrue(input.get('checked'));
926@@ -515,16 +515,16 @@ YUI.add('lp.registry.distroseriesdifferences_details.test', function (Y) {
927 }, 1000);
928 },
929
930- test_blacklist_submit_handler_failure: function() {
931+ test_blocklist_submit_handler_failure: function() {
932 var that = this;
933 module.lp_client.named_post = function(url, func, config) {
934 that.assertIsLocked();
935 config.on.failure();
936 that.assertIsUnlocked();
937 };
938- var input = Y.one('div.blacklist-options input');
939+ var input = Y.one('div.blocklist-options input');
940 input.set('checked', false);
941- this.widget.blacklist_submit_handler(
942+ this.widget.blocklist_submit_handler(
943 null, 'unblocklist', true, "Test comment", input);
944 }
945 }));
946diff --git a/lib/lp/registry/model/distroseriesdifference.py b/lib/lp/registry/model/distroseriesdifference.py
947index d7b942a..64c3a0b 100644
948--- a/lib/lp/registry/model/distroseriesdifference.py
949+++ b/lib/lp/registry/model/distroseriesdifference.py
950@@ -788,7 +788,7 @@ class DistroSeriesDifference(StormBase):
951 Check whether the status of this difference should be updated.
952
953 :param manual: Boolean, True if this is a user-requested change.
954- This overrides auto-blacklisting.
955+ This overrides auto-blocklisting.
956 """
957 # XXX 2011-05-20 bigjools bug=785657
958 # This method needs updating to use some sort of state
959@@ -809,9 +809,9 @@ class DistroSeriesDifference(StormBase):
960 self.source_version = new_source_version
961 updated = True
962 # If the derived version has change and the previous version
963- # was blacklisted, then we remove the blacklist now.
964+ # was blocklisted, then we remove the blocklist now.
965 if self.status == (
966- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
967+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
968 ):
969 self.status = DistroSeriesDifferenceStatus.NEEDS_ATTENTION
970 if self.parent_source_pub:
971@@ -853,16 +853,16 @@ class DistroSeriesDifference(StormBase):
972 and not manual
973 ):
974 # The child was updated with a higher version so it's
975- # auto-blacklisted.
976+ # auto-blocklisted.
977 updated = True
978- self.status = DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
979+ self.status = DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
980 # If this difference was needing attention, or the current version
981- # was blacklisted and the versions now match we resolve it. Note:
982- # we don't resolve it if this difference was blacklisted for all
983+ # was blocklisted and the versions now match we resolve it. Note:
984+ # we don't resolve it if this difference was blocklisted for all
985 # versions.
986 elif self.status in (
987 DistroSeriesDifferenceStatus.NEEDS_ATTENTION,
988- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
989+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
990 ):
991 if (
992 apt_pkg.version_compare(
993@@ -880,8 +880,8 @@ class DistroSeriesDifference(StormBase):
994 and not manual
995 ):
996 # If the derived version is lower than the parent's, we
997- # ensure the diff status is blacklisted.
998- self.status = DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
999+ # ensure the diff status is blocklisted.
1000+ self.status = DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
1001
1002 if self._updateBaseVersion():
1003 updated = True
1004@@ -961,9 +961,9 @@ class DistroSeriesDifference(StormBase):
1005 def blocklist(self, commenter, all=False, comment=None):
1006 """See `IDistroSeriesDifference`."""
1007 if all:
1008- new_status = DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
1009+ new_status = DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
1010 else:
1011- new_status = DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
1012+ new_status = DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
1013 new_comment = self._getCommentWithStatusChange(new_status, comment)
1014 dsd_comment = self.addComment(commenter, new_comment)
1015 self.status = new_status
1016diff --git a/lib/lp/registry/templates/distroseries-localdifferences.pt b/lib/lp/registry/templates/distroseries-localdifferences.pt
1017index 497a4da..917cd54 100644
1018--- a/lib/lp/registry/templates/distroseries-localdifferences.pt
1019+++ b/lib/lp/registry/templates/distroseries-localdifferences.pt
1020@@ -25,7 +25,7 @@
1021 width: 100%;
1022 margin: 0 0 -1px;
1023 }
1024- table.listing .blacklist-options {
1025+ table.listing .blocklist-options {
1026 padding-left: 1em;
1027 }
1028 </style>
1029diff --git a/lib/lp/registry/templates/distroseriesdifference-listing-extra.pt b/lib/lp/registry/templates/distroseriesdifference-listing-extra.pt
1030index e30a513..1b76568 100644
1031--- a/lib/lp/registry/templates/distroseriesdifference-listing-extra.pt
1032+++ b/lib/lp/registry/templates/distroseriesdifference-listing-extra.pt
1033@@ -113,14 +113,14 @@
1034 </dl>
1035 </div>
1036 <div
1037- tal:attributes="class view/blacklist_options_css_class"
1038+ tal:attributes="class view/blocklist_options_css_class"
1039 style="float:left">
1040 <dl>
1041 <dt>Ignored:</dt>
1042 <dd>
1043 <form>
1044 <tal:replace
1045- replace="structure view/widgets/blacklist_options" />
1046+ replace="structure view/widgets/blocklist_options" />
1047 </form>
1048 </dd>
1049 </dl>
1050diff --git a/lib/lp/registry/tests/test_distroseriesdifference.py b/lib/lp/registry/tests/test_distroseriesdifference.py
1051index 9b4f2c7..5195913 100644
1052--- a/lib/lp/registry/tests/test_distroseriesdifference.py
1053+++ b/lib/lp/registry/tests/test_distroseriesdifference.py
1054@@ -252,7 +252,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1055
1056 def test_child_update_re_opens_difference(self):
1057 # The status of a resolved difference will updated to
1058- # BLACKLISTED_CURRENT with child uploads.
1059+ # BLOCKLISTED_CURRENT with child uploads.
1060 ds_diff = self.factory.makeDistroSeriesDifference(
1061 source_package_name_str="foonew",
1062 versions=dict(parent="1.0", derived="1.0"),
1063@@ -269,7 +269,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1064
1065 self.assertTrue(was_updated)
1066 self.assertEqual(
1067- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT, ds_diff.status
1068+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT, ds_diff.status
1069 )
1070
1071 def test_update_new_parent_version_doesnt_change_status(self):
1072@@ -326,8 +326,8 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1073 ds_diff.difference_type,
1074 )
1075
1076- def test_update_removes_version_blacklist(self):
1077- # A blacklist on a version of a package is removed when a new
1078+ def test_update_removes_version_blocklist(self):
1079+ # A blocklist on a version of a package is removed when a new
1080 # version is uploaded to the derived series.
1081 ds_diff = self.factory.makeDistroSeriesDifference(
1082 source_package_name_str="foonew",
1083@@ -337,7 +337,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1084 difference_type=(
1085 DistroSeriesDifferenceType.UNIQUE_TO_DERIVED_SERIES
1086 ),
1087- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
1088+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
1089 )
1090 self.factory.makeSourcePackagePublishingHistory(
1091 sourcepackagename=ds_diff.source_package_name,
1092@@ -353,18 +353,18 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1093 DistroSeriesDifferenceStatus.NEEDS_ATTENTION, ds_diff.status
1094 )
1095
1096- def test_update_does_not_remove_permanent_blacklist(self):
1097- # A permanent blacklist is not removed when a new version
1098+ def test_update_does_not_remove_permanent_blocklist(self):
1099+ # A permanent blocklist is not removed when a new version
1100 # is uploaded, even if it resolves the difference (as later
1101 # uploads could re-create a difference, and we want to keep
1102- # the blacklist).
1103+ # the blocklist).
1104 ds_diff = self.factory.makeDistroSeriesDifference(
1105 source_package_name_str="foonew",
1106 versions={
1107 "derived": "0.9",
1108 "parent": "1.0",
1109 },
1110- status=DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
1111+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
1112 )
1113 self.factory.makeSourcePackagePublishingHistory(
1114 sourcepackagename=ds_diff.source_package_name,
1115@@ -377,7 +377,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1116
1117 self.assertTrue(was_updated)
1118 self.assertEqual(
1119- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS, ds_diff.status
1120+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS, ds_diff.status
1121 )
1122
1123 def test_title(self):
1124@@ -486,7 +486,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1125 )
1126
1127 def test_blocklist_unauthorised(self):
1128- # If you're not an archive admin, you don't get to blacklist or
1129+ # If you're not an archive admin, you don't get to blocklist or
1130 # unblocklist.
1131 ds_diff = self.factory.makeDistroSeriesDifference()
1132 random_joe = self.factory.makePerson()
1133@@ -505,7 +505,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1134 ds_diff.blocklist(admin)
1135
1136 self.assertEqual(
1137- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT, ds_diff.status
1138+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT, ds_diff.status
1139 )
1140
1141 def test_blocklist_all(self):
1142@@ -519,13 +519,13 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1143 ds_diff.blocklist(admin, all=True)
1144
1145 self.assertEqual(
1146- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS, ds_diff.status
1147+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS, ds_diff.status
1148 )
1149
1150 def test_unblocklist(self):
1151 # Unblocklisting will return to NEEDS_ATTENTION by default.
1152 ds_diff = self.factory.makeDistroSeriesDifference(
1153- status=DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
1154+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
1155 )
1156 admin = self.factory.makeArchiveAdmin(
1157 ds_diff.derived_series.main_archive
1158@@ -545,7 +545,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1159 "derived": "0.9",
1160 "parent": "1.0",
1161 },
1162- status=DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
1163+ status=DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
1164 )
1165 self.factory.makeSourcePackagePublishingHistory(
1166 sourcepackagename=ds_diff.source_package_name,
1167@@ -565,7 +565,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1168 def test_get_comment_with_status_change(self):
1169 # Test the new comment string created to describe a status
1170 # change.
1171- old_status = DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
1172+ old_status = DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
1173 new_status = DistroSeriesDifferenceStatus.NEEDS_ATTENTION
1174 new_comment = get_comment_with_status_change(
1175 old_status, new_status, "simple comment"
1176@@ -584,7 +584,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1177 )
1178
1179 def test_unblocklist_creates_comment(self):
1180- old_status = DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
1181+ old_status = DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
1182 ds_diff = self.factory.makeDistroSeriesDifference(
1183 status=old_status, source_package_name_str="foo"
1184 )
1185@@ -613,7 +613,7 @@ class DistroSeriesDifferenceTestCase(TestCaseWithFactory):
1186 dsd_comment = ds_diff.blocklist(
1187 admin, True, "Wait until version 2.1"
1188 )
1189- new_status = DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS
1190+ new_status = DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS
1191 expected_comment = "Wait until version 2.1\n\nIgnored: %s => %s" % (
1192 old_status.title,
1193 new_status.title,
1194@@ -1205,7 +1205,7 @@ class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
1195 series = self.makeDerivedSeries()
1196 dsds = self.makeDifferencesForAllStatuses(series)
1197 dsd_source = getUtility(IDistroSeriesDifferenceSource)
1198- wanted_status = DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT
1199+ wanted_status = DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT
1200 self.assertContentEqual(
1201 [dsds[wanted_status]],
1202 dsd_source.getForDistroSeries(series, status=wanted_status),
1203@@ -1216,7 +1216,7 @@ class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
1204 series = self.makeDerivedSeries()
1205 dsds = self.makeDifferencesForAllStatuses(series)
1206 wanted_statuses = (
1207- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
1208+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
1209 DistroSeriesDifferenceStatus.NEEDS_ATTENTION,
1210 )
1211 dsd_source = getUtility(IDistroSeriesDifferenceSource)
1212@@ -1433,8 +1433,8 @@ class DistroSeriesDifferenceSourceTestCase(TestCaseWithFactory):
1213
1214 def test_getSimpleUpgrades_ignores_hidden_differences(self):
1215 invisible_statuses = [
1216- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT,
1217- DistroSeriesDifferenceStatus.BLACKLISTED_ALWAYS,
1218+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT,
1219+ DistroSeriesDifferenceStatus.BLOCKLISTED_ALWAYS,
1220 DistroSeriesDifferenceStatus.RESOLVED,
1221 ]
1222 dsd_source = getUtility(IDistroSeriesDifferenceSource)
1223diff --git a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
1224index 6f372ff..b0a2e63 100644
1225--- a/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
1226+++ b/lib/lp/soyuz/tests/test_distroseriesdifferencejob.py
1227@@ -780,7 +780,7 @@ class TestDistroSeriesDifferenceJobEndToEnd(TestCaseWithFactory):
1228
1229 def test_child_gets_newer(self):
1230 # When a new source is uploaded to the child distroseries, the DSD is
1231- # updated and auto-blacklisted.
1232+ # updated and auto-blocklisted.
1233 dsp = self.makeDerivedDistroSeries()
1234 source_package_name = self.factory.makeSourcePackageName()
1235 self.createPublication(
1236@@ -805,11 +805,11 @@ class TestDistroSeriesDifferenceJobEndToEnd(TestCaseWithFactory):
1237 )
1238 self.runJob(jobs[0])
1239 self.assertEqual(
1240- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT, ds_diff[0].status
1241+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT, ds_diff[0].status
1242 )
1243 self.assertEqual("1.0-1", ds_diff[0].base_version)
1244
1245- # An additional upload should not change the blacklisted status.
1246+ # An additional upload should not change the blocklisted status.
1247 self.createPublication(
1248 source_package_name, ["2.0-0derived2", "1.0-1"], dsp.derived_series
1249 )
1250@@ -818,7 +818,7 @@ class TestDistroSeriesDifferenceJobEndToEnd(TestCaseWithFactory):
1251 )
1252 self.runJob(jobs[0])
1253 self.assertEqual(
1254- DistroSeriesDifferenceStatus.BLACKLISTED_CURRENT, ds_diff[0].status
1255+ DistroSeriesDifferenceStatus.BLOCKLISTED_CURRENT, ds_diff[0].status
1256 )
1257
1258 def test_child_is_synced(self):

Subscribers

People subscribed via source and target branches

to status/vote changes: