Merge lp:~jml/launchpad/syncUpdate-huh into lp:launchpad

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: no longer in the source branch.
Merged at revision: 13324
Proposed branch: lp:~jml/launchpad/syncUpdate-huh
Merge into: lp:launchpad
Diff against target: 1505 lines (+20/-208)
46 files modified
lib/canonical/launchpad/doc/account.txt (+3/-4)
lib/canonical/launchpad/doc/webapp-authorization.txt (+0/-2)
lib/canonical/launchpad/doc/webapp-publication.txt (+0/-5)
lib/canonical/launchpad/ftests/__init__.py (+0/-2)
lib/canonical/launchpad/ftests/_sqlobject.py (+6/-14)
lib/lp/answers/doc/faq.txt (+0/-5)
lib/lp/archiveuploader/tests/nascentupload-announcements.txt (+0/-5)
lib/lp/archiveuploader/tests/nascentupload.txt (+0/-4)
lib/lp/bugs/browser/tests/bug-views.txt (+0/-5)
lib/lp/bugs/browser/tests/bugs-views.txt (+0/-4)
lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt (+0/-7)
lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt (+0/-4)
lib/lp/bugs/doc/bugnotification-sending.txt (+0/-2)
lib/lp/bugs/doc/bugtask-expiration.txt (+0/-2)
lib/lp/bugs/doc/bugtask-find-similar.txt (+0/-3)
lib/lp/bugs/doc/bugtask-package-bugcounts.txt (+0/-6)
lib/lp/bugs/doc/bugtask-search.txt (+0/-6)
lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt (+1/-5)
lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt (+1/-2)
lib/lp/bugs/tests/bugtarget-bugcount.txt (+4/-5)
lib/lp/code/doc/branch-visibility.txt (+0/-6)
lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt (+0/-2)
lib/lp/registry/doc/mailinglist-subscriptions.txt (+0/-13)
lib/lp/registry/doc/message-holds.txt (+0/-4)
lib/lp/registry/doc/milestone.txt (+0/-7)
lib/lp/registry/doc/person.txt (+0/-2)
lib/lp/registry/doc/product.txt (+0/-2)
lib/lp/registry/doc/projectgroup.txt (+0/-5)
lib/lp/registry/doc/sourcepackage.txt (+0/-4)
lib/lp/registry/doc/standing.txt (+1/-3)
lib/lp/registry/doc/teammembership.txt (+0/-2)
lib/lp/registry/tests/test_commercialprojects_vocabularies.py (+0/-4)
lib/lp/registry/tests/test_product.py (+0/-6)
lib/lp/registry/tests/test_project_milestone.py (+0/-11)
lib/lp/services/memcache/doc/restful-cache.txt (+2/-2)
lib/lp/soyuz/doc/archive-dependencies.txt (+0/-3)
lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt (+1/-3)
lib/lp/soyuz/doc/distribution.txt (+0/-4)
lib/lp/soyuz/doc/distroseriesqueue.txt (+0/-3)
lib/lp/soyuz/doc/queuebuilder.txt (+0/-2)
lib/lp/soyuz/doc/soyuz-set-of-uploads.txt (+0/-8)
lib/lp/soyuz/stories/soyuz/xx-package-diff.txt (+0/-2)
lib/lp/soyuz/tests/soyuz.py (+0/-3)
lib/lp/translations/doc/translationimportqueue.txt (+1/-8)
lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py (+0/-5)
lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt (+0/-2)
To merge this branch: bzr merge lp:~jml/launchpad/syncUpdate-huh
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+66162@code.launchpad.net

Commit message

[r=jml][no-qa] Remove syncUpdate.

Description of the change

Removes syncUpdate. Why not?

(Running tests atm).

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

hahahahahahhaaha

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/doc/account.txt'
2--- lib/canonical/launchpad/doc/account.txt 2011-04-21 10:15:40 +0000
3+++ lib/canonical/launchpad/doc/account.txt 2011-06-28 21:36:15 +0000
4@@ -212,9 +212,9 @@
5 New Accounts are created using the AccountSet.new() method. The account
6 rationale and displayname are required.
7
8- >>> from canonical.launchpad.ftests import syncUpdate
9 >>> from canonical.launchpad.interfaces.account import (
10 ... AccountCreationRationale)
11+ >>> from storm.store import Store
12
13 >>> login('admin@canonical.com')
14 >>> passwordless_account = account_set.new(
15@@ -236,7 +236,7 @@
16 >>> passworded_account = account_set.new(
17 ... AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Passworded',
18 ... password=u'clear_password')
19- >>> syncUpdate(passworded_account)
20+ >>> Store.of(passworded_account).flush()
21 >>> passworded_account.password == u'clear_password'
22 False
23
24@@ -246,7 +246,7 @@
25 >>> clear_account = account_set.new(
26 ... AccountCreationRationale.OWNER_CREATED_LAUNCHPAD , 'Clear',
27 ... password=u'clear_password', password_is_encrypted=True)
28- >>> syncUpdate(clear_account)
29+ >>> Store.of(clear_account).flush()
30 >>> print clear_account.password
31 clear_password
32
33@@ -261,7 +261,6 @@
34 >>> account = account_set.new(
35 ... AccountCreationRationale.USER_CREATED,
36 ... "Valid Account Test")
37- >>> syncUpdate(account)
38 >>> account.status = AccountStatus.ACTIVE
39 >>> account.is_valid
40 False
41
42=== modified file 'lib/canonical/launchpad/doc/webapp-authorization.txt'
43--- lib/canonical/launchpad/doc/webapp-authorization.txt 2010-10-20 01:36:53 +0000
44+++ lib/canonical/launchpad/doc/webapp-authorization.txt 2011-06-28 21:36:15 +0000
45@@ -60,13 +60,11 @@
46 access to private objects. For instance, the above principal has
47 permission to read private and non-private objects (READ_PRIVATE).
48
49- >>> from canonical.launchpad.ftests import syncUpdate
50 >>> from lp.bugs.interfaces.bug import IBugSet
51 >>> login('test@canonical.com')
52 >>> bug_1 = getUtility(IBugSet).get(1)
53 >>> bug_1.setPrivate(True, sample_person)
54 True
55- >>> syncUpdate(bug_1)
56 >>> check_permission('launchpad.View', bug_1)
57 True
58
59
60=== modified file 'lib/canonical/launchpad/doc/webapp-publication.txt'
61--- lib/canonical/launchpad/doc/webapp-publication.txt 2011-05-26 18:56:27 +0000
62+++ lib/canonical/launchpad/doc/webapp-publication.txt 2011-06-28 21:36:15 +0000
63@@ -906,7 +906,6 @@
64 be automatically reverted in a GET request.
65
66 >>> from canonical.launchpad.database.emailaddress import EmailAddress
67- >>> from canonical.launchpad.ftests import syncUpdate
68 >>> from canonical.launchpad.interfaces.lpstorm import IMasterStore
69 >>> from lp.registry.model.person import Person
70 >>> login('foo.bar@canonical.com')
71@@ -920,7 +919,6 @@
72 >>> print foo_bar.homepage_content
73 None
74 >>> foo_bar.homepage_content = 'Montreal'
75- >>> syncUpdate(foo_bar)
76
77 >>> request, publication = get_request_and_publication(method='GET')
78
79@@ -939,7 +937,6 @@
80
81 >>> txn = transaction.begin()
82 >>> get_foo_bar_person().homepage_content = 'Darwin'
83- >>> syncUpdate(foo_bar)
84
85 >>> request, publication = get_request_and_publication(method='POST')
86
87@@ -1195,7 +1192,6 @@
88 >>> import pytz
89 >>> now = datetime.now(pytz.timezone('UTC'))
90 >>> access_token.date_expires = now - timedelta(days=1)
91- >>> syncUpdate(access_token)
92 >>> form2 = form.copy()
93 >>> form2['oauth_nonce'] = '1764572616e48616d6d65724c61686'
94 >>> test_request = LaunchpadTestRequest(form=form2)
95@@ -1205,7 +1201,6 @@
96 TokenException: Expired token...
97
98 >>> access_token.date_expires = now + timedelta(days=1)
99- >>> syncUpdate(access_token)
100
101 >>> form2 = form.copy()
102 >>> form2['oauth_token'] += 'z'
103
104=== modified file 'lib/canonical/launchpad/ftests/__init__.py'
105--- lib/canonical/launchpad/ftests/__init__.py 2011-06-23 13:10:40 +0000
106+++ lib/canonical/launchpad/ftests/__init__.py 2011-06-28 21:36:15 +0000
107@@ -17,7 +17,6 @@
108 'print_date_attribute',
109 'set_so_attr',
110 'sync',
111- 'syncUpdate',
112 ]
113
114 from canonical.launchpad.ftests._launchpadformharness import (
115@@ -27,7 +26,6 @@
116 print_date_attribute,
117 set_so_attr,
118 sync,
119- syncUpdate,
120 )
121 from canonical.launchpad.ftests.keys_for_tests import (
122 decrypt_content,
123
124=== modified file 'lib/canonical/launchpad/ftests/_sqlobject.py'
125--- lib/canonical/launchpad/ftests/_sqlobject.py 2010-08-20 20:31:18 +0000
126+++ lib/canonical/launchpad/ftests/_sqlobject.py 2011-06-28 21:36:15 +0000
127@@ -1,12 +1,13 @@
128-# Copyright 2009 Canonical Ltd. This software is licensed under the
129+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
130 # GNU Affero General Public License version 3 (see the file LICENSE).
131
132 """Helper functions for testing SQLObjects."""
133
134-__all__ = ['print_date_attribute',
135- 'set_so_attr',
136- 'sync',
137- 'syncUpdate']
138+__all__ = [
139+ 'print_date_attribute',
140+ 'set_so_attr',
141+ 'sync',
142+ ]
143
144 from storm.sqlobject import SQLObjectBase as SQLObject
145 from zope.security.proxy import (
146@@ -30,14 +31,6 @@
147 raise TypeError('%r is not an SQLObject' % object)
148
149
150-def syncUpdate(object):
151- """Write the object's changes to the database."""
152- if zope_isinstance(object, SQLObject):
153- removeSecurityProxy(object).syncUpdate()
154- else:
155- raise TypeError('%r is not an SQLObject' % object)
156-
157-
158 def set_so_attr(object, colname, value):
159 """Set the underlying SQLObject's column value.
160
161@@ -62,7 +55,6 @@
162 """
163 if zope_isinstance(object, SQLObject):
164 cls = removeSecurityProxy(object).__class__
165- syncUpdate(object)
166 query_template = 'id=%%s AND %s=%%s' % colname
167 found_object = cls.selectOne(
168 query_template % sqlvalues(object.id, UTC_NOW))
169
170=== modified file 'lib/lp/answers/doc/faq.txt'
171--- lib/lp/answers/doc/faq.txt 2011-05-21 19:41:52 +0000
172+++ lib/lp/answers/doc/faq.txt 2011-06-28 21:36:15 +0000
173@@ -281,9 +281,6 @@
174
175 # Flush the faq attribute change.
176
177- >>> from canonical.launchpad.ftests import syncUpdate
178- >>> syncUpdate(fnord_question)
179-
180 >>> for question in firefox_faq.related_questions:
181 ... print question.title
182 Are there Fnords on the web?
183@@ -301,7 +298,6 @@
184 >>> print other_question.status.title
185 Answered
186
187- >>> syncUpdate(other_question)
188 >>> for question in firefox_faq.related_questions:
189 ... print question.title
190 Firefox loses focus and gets stuck
191@@ -317,7 +313,6 @@
192
193 After this, only the original question will remain linked to the FAQ.
194
195- >>> syncUpdate(other_question)
196 >>> for question in firefox_faq.related_questions:
197 ... print question.title
198 Are there Fnords on the web?
199
200=== modified file 'lib/lp/archiveuploader/tests/nascentupload-announcements.txt'
201--- lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-06-16 10:00:35 +0000
202+++ lib/lp/archiveuploader/tests/nascentupload-announcements.txt 2011-06-28 21:36:15 +0000
203@@ -128,11 +128,6 @@
204 >>> import transaction
205 >>> transaction.commit()
206
207-Ensure the previous transaction is *really* in the database before the next
208-test:
209-
210- >>> from canonical.launchpad.ftests import syncUpdate
211- >>> syncUpdate(bar_src.queue_root)
212
213 Uploading the same package again will result in a rejection email:
214
215
216=== modified file 'lib/lp/archiveuploader/tests/nascentupload.txt'
217--- lib/lp/archiveuploader/tests/nascentupload.txt 2011-06-16 10:00:35 +0000
218+++ lib/lp/archiveuploader/tests/nascentupload.txt 2011-06-28 21:36:15 +0000
219@@ -387,8 +387,6 @@
220 The ed source would be in NEW, so punt it into accepted.
221
222 >>> ed_src.queue_root.setAccepted()
223- >>> from canonical.launchpad.ftests import syncUpdate
224- >>> syncUpdate(ed_src.queue_root)
225
226
227 Allow uploads missing debian/copyright file
228@@ -434,7 +432,6 @@
229 Let's reject the upload to avoid confusion during the next tests:
230
231 >>> nocopyright_queue.setRejected()
232- >>> syncUpdate(nocopyright_queue)
233
234
235 Refuse to ACCEPT duplicated sources
236@@ -546,7 +543,6 @@
237 Once we have a new queue entry we are able to accept it, step 2:
238
239 >>> multibar_src_queue.setAccepted()
240- >>> syncUpdate(multibar_src_queue)
241 >>> multibar_src_queue.status.name
242 'ACCEPTED'
243
244
245=== modified file 'lib/lp/bugs/browser/tests/bug-views.txt'
246--- lib/lp/bugs/browser/tests/bug-views.txt 2011-06-17 21:13:22 +0000
247+++ lib/lp/bugs/browser/tests/bug-views.txt 2011-06-28 21:36:15 +0000
248@@ -399,10 +399,7 @@
249 a dupe of bug #3, then Steve gets indirectly subscribed to bug #3, and
250 is presented with the "Edit subscription" link.
251
252- >>> from canonical.launchpad.ftests import syncUpdate
253-
254 >>> bug_two.markAsDuplicate(bug_three)
255- >>> syncUpdate(bug_two)
256
257 >>> bug_menu.subscription().text
258 'Edit subscription'
259@@ -413,7 +410,6 @@
260 Subscribe link initially.
261
262 >>> bug_two.markAsDuplicate(None)
263- >>> syncUpdate(bug_two)
264
265 >>> login("foo.bar@canonical.com")
266
267@@ -428,7 +424,6 @@
268 <lp.bugs.model.bugsubscription.BugSubscription ...>
269
270 >>> bug_two.markAsDuplicate(bug_three)
271- >>> syncUpdate(bug_two)
272
273 >>> bug_menu.subscription().text
274 'Subscribe'
275
276=== modified file 'lib/lp/bugs/browser/tests/bugs-views.txt'
277--- lib/lp/bugs/browser/tests/bugs-views.txt 2010-11-01 15:46:48 +0000
278+++ lib/lp/bugs/browser/tests/bugs-views.txt 2011-06-28 21:36:15 +0000
279@@ -31,7 +31,6 @@
280 in the future.
281
282 >>> login('test@canonical.com')
283- >>> from canonical.launchpad.ftests import syncUpdate
284 >>> from lp.bugs.interfaces.bug import IBugSet
285 >>> bug_eight = getUtility(IBugSet).get(8)
286 >>> len(bug_eight.bugtasks)
287@@ -42,7 +41,6 @@
288 ... bugtask = getUtility(IBugSet).get(bug_id).bugtasks[bugtask_index]
289 ... bugtask.transitionToStatus(
290 ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
291- ... syncUpdate(bugtask)
292 >>> fix_bug(8)
293
294 If we fix a few other bugs, these will turn up first in the list. It
295@@ -79,7 +77,6 @@
296 >>> bug_two = getUtility(IBugSet).get(2)
297 >>> bug_two.setPrivate(True, getUtility(ILaunchBag).user)
298 True
299- >>> syncUpdate(bug_two)
300
301 >>> login('no-priv@canonical.com')
302 >>> bugs_view = MaloneView(MaloneApplication(), LaunchpadTestRequest())
303@@ -120,7 +117,6 @@
304 ... comment='Test bug #%s.' % index))
305 ... bug.bugtasks[0].transitionToStatus(
306 ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
307- ... syncUpdate(bug.bugtasks[0])
308
309 >>> len(bugs_view.getMostRecentlyFixedBugs())
310 5
311
312=== modified file 'lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt'
313--- lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt 2011-03-23 16:28:51 +0000
314+++ lib/lp/bugs/browser/tests/special/bugs-fixed-elsewhere.txt 2011-06-28 21:36:15 +0000
315@@ -52,11 +52,9 @@
316 But if we mark the bug as fixed in the other, the count will increase
317 by one.
318
319- >>> from canonical.launchpad.ftests import syncUpdate
320 >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
321 >>> elsewhere.transitionToStatus(
322 ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
323- >>> syncUpdate(elsewhere)
324
325 >>> get_view().bugs_fixed_elsewhere_count
326 1L
327@@ -88,13 +86,11 @@
328 >>> another_bug = filebug(bugtarget, 'Example Bug')
329 >>> another_bug.setPrivate(True, getUtility(ILaunchBag).user)
330 True
331- >>> syncUpdate(another_bug)
332
333 >>> another_elsewhere = getUtility(IBugTaskSet).createTask(
334 ... another_bug, owner=getUtility(ILaunchBag).user, product=evolution)
335 >>> another_elsewhere.transitionToStatus(
336 ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
337- >>> syncUpdate(another_elsewhere)
338
339 >>> get_view().bugs_fixed_elsewhere_count
340 2L
341@@ -112,7 +108,6 @@
342 >>> login('foo.bar@canonical.com')
343 >>> another_bug.setPrivate(False, getUtility(ILaunchBag).user)
344 True
345- >>> syncUpdate(another_bug)
346
347 >>> login('no-priv@canonical.com')
348 >>> get_view().bugs_fixed_elsewhere_count
349@@ -124,7 +119,6 @@
350 Bugs that are duplicate of other bugs aren't included in the count.
351
352 >>> another_bug.markAsDuplicate(bug)
353- >>> syncUpdate(another_bug)
354
355 >>> get_view().bugs_fixed_elsewhere_count
356 1L
357@@ -141,7 +135,6 @@
358 ... print "Couldn't find a bugtasks for %r" % bugtarget
359 >>> bugtask.transitionToStatus(
360 ... BugTaskStatus.FIXRELEASED, getUtility(ILaunchBag).user)
361- >>> syncUpdate(bugtask)
362
363 >>> get_view().bugs_fixed_elsewhere_count
364 0
365
366=== modified file 'lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt'
367--- lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt 2010-08-02 17:48:13 +0000
368+++ lib/lp/bugs/browser/tests/special/bugtarget-recently-touched-bugs.txt 2011-06-28 21:36:15 +0000
369@@ -12,11 +12,9 @@
370
371 >>> import pytz
372 >>> from datetime import datetime, timedelta
373- >>> from canonical.launchpad.ftests import syncUpdate
374 >>> now = datetime.now(pytz.timezone('UTC'))
375 >>> def set_date_updated(bug, minutes_in_future):
376 ... bug.date_last_updated = now + timedelta(minutes=minutes_in_future)
377- ... syncUpdate(bug)
378
379 If we have three bugs with a recent date_last_updated set, they will
380 appear in the top of the list.
381@@ -52,7 +50,6 @@
382
383 >>> bug_c.setPrivate(True, getUtility(ILaunchBag).user)
384 True
385- >>> syncUpdate(bug_c)
386
387 >>> login('no-priv@canonical.com')
388 >>> portlet_view = getMultiAdapter(
389@@ -81,7 +78,6 @@
390 well.
391
392 >>> bug_b.markAsDuplicate(bug_c)
393- >>> syncUpdate(bug_b)
394
395 >>> for bugtask in portlet_view.getMostRecentlyUpdatedBugTasks()[:2]:
396 ... print bugtask.bug.title
397
398=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
399--- lib/lp/bugs/doc/bugnotification-sending.txt 2011-06-15 11:19:21 +0000
400+++ lib/lp/bugs/doc/bugnotification-sending.txt 2011-06-28 21:36:15 +0000
401@@ -920,10 +920,8 @@
402 >>> len(notifications)
403 1
404
405- >>> from canonical.launchpad.ftests import syncUpdate
406 >>> for notification in notifications:
407 ... notification.date_emailed = datetime.now(pytz.timezone('UTC'))
408- ... syncUpdate(notification)
409
410
411 If we then add a comment to the bug, the subscribers will receive
412
413=== modified file 'lib/lp/bugs/doc/bugtask-expiration.txt'
414--- lib/lp/bugs/doc/bugtask-expiration.txt 2011-05-27 19:53:20 +0000
415+++ lib/lp/bugs/doc/bugtask-expiration.txt 2011-06-28 21:36:15 +0000
416@@ -386,13 +386,11 @@
417 If one of the bugs is set to private, anonymous users can no longer see
418 it as being marked for expiration.
419
420- >>> from canonical.launchpad.ftests import syncUpdate
421 >>> private_bug = ubuntu_bugtask.bug
422 >>> private_bug.title
423 u'expirable_distro'
424 >>> private_bug.setPrivate(True, sample_person)
425 True
426- >>> syncUpdate(private_bug)
427
428 >>> expirable_bugtasks = bugtaskset.findExpirableBugTasks(
429 ... 0, user=None, target=ubuntu)
430
431=== modified file 'lib/lp/bugs/doc/bugtask-find-similar.txt'
432--- lib/lp/bugs/doc/bugtask-find-similar.txt 2010-11-05 18:00:24 +0000
433+++ lib/lp/bugs/doc/bugtask-find-similar.txt 2011-06-28 21:36:15 +0000
434@@ -82,13 +82,11 @@
435 the Firefox bug to private, and repeat the search as a user who isn't
436 allowed to view it, only the Thunderbird bug will be returned this time.
437
438- >>> from canonical.launchpad.ftests import syncUpdate
439 >>> from lp.bugs.interfaces.bug import IBugSet
440 >>> login('test@canonical.com')
441 >>> firefox_svg_bug = getUtility(IBugSet).get(1)
442 >>> firefox_svg_bug.setPrivate(True, getUtility(ILaunchBag).user)
443 True
444- >>> syncUpdate(firefox_svg_bug)
445
446 >>> from canonical.launchpad.webapp.authorization import check_permission
447 >>> login('no-priv@canonical.com')
448@@ -105,7 +103,6 @@
449 >>> login('test@canonical.com')
450 >>> firefox_svg_bug.setPrivate(False, getUtility(ILaunchBag).user)
451 True
452- >>> syncUpdate(firefox_svg_bug)
453
454
455 == Ordering of search results ==
456
457=== modified file 'lib/lp/bugs/doc/bugtask-package-bugcounts.txt'
458--- lib/lp/bugs/doc/bugtask-package-bugcounts.txt 2010-10-09 16:36:22 +0000
459+++ lib/lp/bugs/doc/bugtask-package-bugcounts.txt 2011-06-28 21:36:15 +0000
460@@ -82,12 +82,10 @@
461 If we mark the bug as critical, the open_critical count will increase.
462
463 >>> login('foo.bar@canonical.com')
464- >>> from canonical.launchpad.ftests import syncUpdate
465 >>> from lp.bugs.interfaces.bugtask import BugTaskImportance
466 >>> [ubuntu_firefox_bugtask] = bug.bugtasks
467 >>> ubuntu_firefox_bugtask.transitionToImportance(
468 ... BugTaskImportance.CRITICAL, getUtility(ILaunchBag).user)
469- >>> syncUpdate(ubuntu_firefox_bugtask)
470
471 >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
472 ... user=None, packages=packages)
473@@ -103,7 +101,6 @@
474 decrease.
475
476 >>> ubuntu_firefox_bugtask.transitionToAssignee(foo_bar)
477- >>> syncUpdate(ubuntu_firefox_bugtask)
478
479 >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
480 ... user=None, packages=packages)
481@@ -120,7 +117,6 @@
482 >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
483 >>> ubuntu_firefox_bugtask.transitionToStatus(
484 ... BugTaskStatus.INPROGRESS, getUtility(ILaunchBag).user)
485- >>> syncUpdate(ubuntu_firefox_bugtask)
486
487 >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
488 ... user=None, packages=packages)
489@@ -140,7 +136,6 @@
490
491 >>> bug.setPrivate(True, getUtility(ILaunchBag).user)
492 True
493- >>> syncUpdate(bug)
494
495 >>> no_priv = getUtility(IPersonSet).getByEmail('no-priv@canonical.com')
496 >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
497@@ -171,7 +166,6 @@
498
499 >>> from lp.bugs.interfaces.bug import IBugSet
500 >>> bug.markAsDuplicate(getUtility(IBugSet).get(1))
501- >>> syncUpdate(bug)
502 >>> package_counts = getUtility(IBugTaskSet).getBugCountsForPackages(
503 ... user=foo_bar, packages=packages)
504 >>> print_package_counts(package_counts[1])
505
506=== modified file 'lib/lp/bugs/doc/bugtask-search.txt'
507--- lib/lp/bugs/doc/bugtask-search.txt 2011-05-13 16:50:50 +0000
508+++ lib/lp/bugs/doc/bugtask-search.txt 2011-06-28 21:36:15 +0000
509@@ -98,9 +98,7 @@
510 bugs return all of Firefox's bugs.
511
512 >>> login('foo.bar@canonical.com')
513- >>> from canonical.launchpad.ftests import syncUpdate
514 >>> firefox.setBugSupervisor(no_priv, no_priv)
515- >>> syncUpdate(firefox)
516
517 >>> found_bugtasks = bugtask_set.search(no_priv_bug_supervisor)
518 >>> found_bugtasks.count() == firefox_bugs.count()
519@@ -126,7 +124,6 @@
520 True
521
522 >>> ubuntu.setBugSupervisor(no_priv, no_priv)
523- >>> syncUpdate(ubuntu)
524 >>> found_bugtasks = bugtask_set.search(no_priv_bug_supervisor)
525 >>> found_bugtasks.count() == firefox_bugs.count() + ubuntu_bugs.count()
526 True
527@@ -213,7 +210,6 @@
528 >>> bug_four.description += (
529 ... '\nThat happens pretty often with the Fnord Highlighter '
530 ... 'extension installed.')
531- >>> syncUpdate(bug_four)
532
533 >>> found_bugtasks = firefox.searchTasks(text_search)
534 >>> for bugtask in found_bugtasks:
535@@ -494,7 +490,6 @@
536 >>> print bugTaskInfo(bugtask)
537 2 1 Mozilla Firefox Firefox does not support SVG
538 >>> bugtask.milestone = product_milestone
539- >>> syncUpdate(bugtask)
540 >>> params = BugTaskSearchParams(milestone=product_milestone, user=None)
541 >>> milestone_tasks = bugtask_set.search(params)
542 >>> for bugtask in milestone_tasks:
543@@ -517,7 +512,6 @@
544 >>> productseries_task = bugtask_set.createTask(
545 ... owner=no_priv, bug=bug_one, productseries=firefox_1_0)
546 >>> productseries_task.milestone = product_milestone
547- >>> syncUpdate(productseries_task)
548 >>> print bugTaskInfo(productseries_task)
549 40 1 Mozilla Firefox 1.0 Firefox does not support SVG
550
551
552=== modified file 'lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt'
553--- lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt 2010-10-18 22:24:59 +0000
554+++ lib/lp/bugs/stories/bugattachments/xx-attachments-to-bug-report.txt 2011-06-28 21:36:15 +0000
555@@ -21,7 +21,7 @@
556
557 >>> import StringIO
558 >>> from zope.component import getUtility
559- >>> from canonical.launchpad.ftests import login, logout, syncUpdate
560+ >>> from canonical.launchpad.ftests import login, logout
561 >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
562 >>> from lp.bugs.interfaces.bug import IBugSet
563 >>> login("test@canonical.com")
564@@ -33,8 +33,6 @@
565 ... comment=bug_11.initial_message, filename='test.txt',
566 ... is_patch=False, content_type='text/plain',
567 ... description='sample data')
568- >>> syncUpdate(attachment)
569- >>> syncUpdate(bug_11)
570 >>> logout()
571
572 ...the first displayed comment shows a link to the attachment, but it
573@@ -64,8 +62,6 @@
574 ... comment=bug_11.initial_message, filename='patch.txt',
575 ... is_patch=True, content_type='text/plain',
576 ... description='a patch')
577- >>> syncUpdate(patch_attachment)
578- >>> syncUpdate(bug_11)
579 >>> logout()
580 >>> browser.open("http://bugs.launchpad.dev/redfish/+bug/11")
581 >>> print extract_text(browser.contents)
582
583=== modified file 'lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt'
584--- lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2010-10-25 13:42:57 +0000
585+++ lib/lp/bugs/stories/bugs/xx-bugs-advanced-search-upstream-status.txt 2011-06-28 21:36:15 +0000
586@@ -38,7 +38,7 @@
587 are not included in the report.
588
589 >>> from zope.component import getUtility
590- >>> from canonical.launchpad.ftests import login, logout, syncUpdate
591+ >>> from canonical.launchpad.ftests import login, logout
592 >>> from canonical.launchpad.webapp.interfaces import ILaunchBag
593 >>> from lp.bugs.interfaces.bug import IBugSet
594 >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
595@@ -50,7 +50,6 @@
596 ... if not bugtask.target_uses_malone:
597 ... bugtask.transitionToStatus(
598 ... BugTaskStatus.INVALID, getUtility(ILaunchBag).user)
599- ... syncUpdate(bugtask)
600
601 >>> for bugtask in bug_two.bugtasks:
602 ... print "%s, %s" % (
603
604=== modified file 'lib/lp/bugs/tests/bugtarget-bugcount.txt'
605--- lib/lp/bugs/tests/bugtarget-bugcount.txt 2010-10-09 16:36:22 +0000
606+++ lib/lp/bugs/tests/bugtarget-bugcount.txt 2011-06-28 21:36:15 +0000
607@@ -69,7 +69,6 @@
608 If we take a bug that is in one status and changes it to another, the
609 former status' count will of course decrease, and the latter's increase.
610
611- >>> from canonical.launchpad.ftests import syncUpdate
612 >>> bug = filebug(bugtarget, "Test Bug", status=BugTaskStatus.CONFIRMED)
613 >>> Store.of(bug).flush()
614 >>> old_counts = bugtarget.getBugCounts(None)
615@@ -78,7 +77,7 @@
616 ... break
617 >>> bugtask.transitionToStatus(
618 ... BugTaskStatus.INCOMPLETE, getUtility(ILaunchBag).user)
619- >>> syncUpdate(bugtask)
620+ >>> Store.of(bugtask).flush()
621 >>> new_bug_counts = bugtarget.getBugCounts(None)
622 >>> print_count_difference(
623 ... new_bug_counts, old_counts, BugTaskStatus.CONFIRMED)
624@@ -98,7 +97,7 @@
625 >>> old_counts = bugtarget.getBugCounts(None)
626 >>> bug.setPrivate(True, getUtility(ILaunchBag).user)
627 True
628- >>> syncUpdate(bug)
629+ >>> Store.of(bug).flush()
630 >>> sample_person_counts = bugtarget.getBugCounts(
631 ... getUtility(IPersonSet).getByEmail('test@canonical.com'))
632 >>> nopriv_counts = bugtarget.getBugCounts(
633@@ -118,7 +117,8 @@
634
635 >>> bug.setPrivate(False, getUtility(ILaunchBag).user)
636 True
637- >>> syncUpdate(bug)
638+ >>> Store.of(bug).flush()
639+
640
641 == Duplicate Bugs ==
642
643@@ -130,7 +130,6 @@
644 >>> Store.of(another_bug).flush()
645 >>> old_counts = bugtarget.getBugCounts(None)
646 >>> another_bug.markAsDuplicate(bug)
647- >>> syncUpdate(another_bug)
648 >>> new_counts = bugtarget.getBugCounts(None)
649 >>> print_count_difference(
650 ... new_counts, old_counts, BugTaskStatus.NEW)
651
652=== modified file 'lib/lp/code/doc/branch-visibility.txt'
653--- lib/lp/code/doc/branch-visibility.txt 2011-05-27 19:53:20 +0000
654+++ lib/lp/code/doc/branch-visibility.txt 2011-06-28 21:36:15 +0000
655@@ -188,12 +188,6 @@
656
657 >>> login('foo.bar@canonical.com')
658
659-The syncUpdate call is necessary to make sure the database has the
660-private flag set correctly for the branch.
661-
662- >>> from canonical.launchpad.ftests import syncUpdate
663- >>> syncUpdate(branch)
664-
665 >>> branch_set = getUtility(IBranchSet)
666
667 Anonymous users see just the public branches.
668
669=== modified file 'lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt'
670--- lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt 2010-10-18 22:24:59 +0000
671+++ lib/lp/registry/doc/mailinglist-subscriptions-xmlrpc.txt 2011-06-28 21:36:15 +0000
672@@ -301,8 +301,6 @@
673 private before its mailing list is created.
674
675 >>> team_three.visibility = PersonVisibility.PRIVATE
676- >>> from canonical.launchpad.ftests import syncUpdate
677- >>> syncUpdate(team_three)
678 >>> queryAdapter(team_three, IObjectPrivacy).is_private
679 True
680
681
682=== modified file 'lib/lp/registry/doc/mailinglist-subscriptions.txt'
683--- lib/lp/registry/doc/mailinglist-subscriptions.txt 2010-10-09 16:36:22 +0000
684+++ lib/lp/registry/doc/mailinglist-subscriptions.txt 2011-06-28 21:36:15 +0000
685@@ -9,9 +9,6 @@
686 # and change their mailing list auto-subscription settings.
687 >>> login('foo.bar@canonical.com')
688
689- # We'll need this throughout the test script.
690- >>> from canonical.launchpad.ftests import syncUpdate
691-
692 >>> from lp.registry.tests.mailinglists_helper import (
693 ... get_alternative_email, print_addresses)
694 >>> anne = factory.makePersonByName('Anne')
695@@ -158,7 +155,6 @@
696
697 # Reverse the validation so that it doesn't affect subsequent tests.
698 >>> alternative.status = EmailAddressStatus.NEW
699- >>> syncUpdate(alternative)
700
701
702 MailingListSubscription objects
703@@ -1420,17 +1416,14 @@
704 # the security context in order to set it.
705 >>> from zope.security.proxy import removeSecurityProxy
706 >>> removeSecurityProxy(list_seven).status = MailingListStatus.MODIFIED
707- >>> syncUpdate(list_seven)
708 >>> list_seven.subscribe(teri)
709 >>> list_seven.unsubscribe(teri)
710
711 >>> removeSecurityProxy(list_seven).status = MailingListStatus.UPDATING
712- >>> syncUpdate(list_seven)
713 >>> list_seven.subscribe(teri)
714 >>> list_seven.unsubscribe(teri)
715
716 >>> removeSecurityProxy(list_seven).status = MailingListStatus.MOD_FAILED
717- >>> syncUpdate(list_seven)
718 >>> list_seven.subscribe(teri)
719 >>> list_seven.unsubscribe(teri)
720
721@@ -1439,35 +1432,30 @@
722
723 # We don't need to test the INACTIVE state, as that's represented above.
724 >>> removeSecurityProxy(list_seven).status = MailingListStatus.REGISTERED
725- >>> syncUpdate(list_seven)
726 >>> list_seven.subscribe(teri)
727 Traceback (most recent call last):
728 ...
729 CannotSubscribe: Mailing list is not usable: Team 7
730
731 >>> removeSecurityProxy(list_seven).status = MailingListStatus.APPROVED
732- >>> syncUpdate(list_seven)
733 >>> list_seven.subscribe(teri)
734 Traceback (most recent call last):
735 ...
736 CannotSubscribe: Mailing list is not usable: Team 7
737
738 >>> removeSecurityProxy(list_seven).status = MailingListStatus.DECLINED
739- >>> syncUpdate(list_seven)
740 >>> list_seven.subscribe(teri)
741 Traceback (most recent call last):
742 ...
743 CannotSubscribe: Mailing list is not usable: Team 7
744
745 >>> removeSecurityProxy(list_seven).status = MailingListStatus.CONSTRUCTING
746- >>> syncUpdate(list_seven)
747 >>> list_seven.subscribe(teri)
748 Traceback (most recent call last):
749 ...
750 CannotSubscribe: Mailing list is not usable: Team 7
751
752 >>> removeSecurityProxy(list_seven).status = MailingListStatus.FAILED
753- >>> syncUpdate(list_seven)
754 >>> list_seven.subscribe(teri)
755 Traceback (most recent call last):
756 ...
757@@ -1475,7 +1463,6 @@
758
759 >>> removeSecurityProxy(list_seven).status = (
760 ... MailingListStatus.DEACTIVATING)
761- >>> syncUpdate(list_seven)
762 >>> list_seven.subscribe(teri)
763 Traceback (most recent call last):
764 ...
765
766=== modified file 'lib/lp/registry/doc/message-holds.txt'
767--- lib/lp/registry/doc/message-holds.txt 2011-05-13 16:50:50 +0000
768+++ lib/lp/registry/doc/message-holds.txt 2011-06-28 21:36:15 +0000
769@@ -150,8 +150,6 @@
770 >>> print owner.displayname
771 No Privileges Person
772 >>> held_message.approve(owner)
773- >>> from canonical.launchpad.ftests import syncUpdate
774- >>> syncUpdate(held_message)
775
776 This sets the status of the hold to APPROVAL_PENDING because Mailman
777 still needs to see this approval.
778@@ -183,7 +181,6 @@
779 ... """)
780 >>> held_message = list_one.holdMessage(message)
781 >>> held_message.reject(owner)
782- >>> syncUpdate(held_message)
783
784 >>> print held_message.message_id
785 <second-post>
786@@ -211,7 +208,6 @@
787 ... """)
788 >>> held_message = list_one.holdMessage(message)
789 >>> held_message.discard(owner)
790- >>> syncUpdate(held_message)
791
792 >>> print held_message.message_id
793 <third-post>
794
795=== modified file 'lib/lp/registry/doc/milestone.txt'
796--- lib/lp/registry/doc/milestone.txt 2011-01-20 17:05:12 +0000
797+++ lib/lp/registry/doc/milestone.txt 2011-06-28 21:36:15 +0000
798@@ -230,7 +230,6 @@
799 A project milestone is active, if at least one product milestone with
800 the same name is active.
801
802- >>> from canonical.launchpad.ftests import syncUpdate
803 >>> print applets_1_1.active, evolution_1_1.active
804 True True
805
806@@ -238,12 +237,10 @@
807 True
808
809 >>> applets_1_1.active = False
810- >>> syncUpdate(applets_1_1)
811 >>> print gnome.getMilestone('1.1').active
812 True
813
814 >>> evolution_1_1.active = False
815- >>> syncUpdate(evolution_1_1)
816 >>> print gnome.getMilestone('1.1').active
817 False
818
819@@ -258,14 +255,12 @@
820 >>> from lp.testing import unlink_source_packages
821 >>> unlink_source_packages(netapplet)
822 >>> netapplet.active = False
823- >>> syncUpdate(netapplet)
824 >>> print [milestone.name for milestone in gnome.milestones]
825 []
826
827 # Reset the product back to original status so future tests pass.
828
829 >>> netapplet.active = True
830- >>> syncUpdate(netapplet)
831
832 The dateexpected attribute is set to the minimum of the dateexpected
833 values of the product milestones.
834@@ -278,12 +273,10 @@
835
836 >>> from datetime import datetime
837 >>> applets_1_1.dateexpected = datetime(2007, 4, 2)
838- >>> syncUpdate(applets_1_1)
839 >>> print gnome.getMilestone('1.1').dateexpected
840 2007-04-02 00:00:00
841
842 >>> evolution_1_1.dateexpected = datetime(2007, 4, 1)
843- >>> syncUpdate(evolution_1_1)
844 >>> print gnome.getMilestone('1.1').dateexpected
845 2007-04-01 00:00:00
846
847
848=== modified file 'lib/lp/registry/doc/person.txt'
849--- lib/lp/registry/doc/person.txt 2011-06-06 19:39:45 +0000
850+++ lib/lp/registry/doc/person.txt 2011-06-28 21:36:15 +0000
851@@ -339,8 +339,6 @@
852 >>> from lp.registry.interfaces.person import PersonalStanding
853 >>> lifeless.personal_standing = PersonalStanding.GOOD
854 >>> lifeless.personal_standing_reason = 'Such a cool guy!'
855- >>> from canonical.launchpad.ftests import syncUpdate
856- >>> syncUpdate(lifeless)
857
858 >>> lifeless.personal_standing
859 <DBItem PersonalStanding.GOOD...
860
861=== modified file 'lib/lp/registry/doc/product.txt'
862--- lib/lp/registry/doc/product.txt 2011-05-12 18:25:06 +0000
863+++ lib/lp/registry/doc/product.txt 2011-06-28 21:36:15 +0000
864@@ -585,8 +585,6 @@
865 Only active products are returned.
866
867 >>> evo.active = False
868- >>> from canonical.launchpad.ftests import syncUpdate
869- >>> syncUpdate(firefox)
870 >>> for product in productset.getProductsWithBranches():
871 ... print product.name
872 firefox
873
874=== modified file 'lib/lp/registry/doc/projectgroup.txt'
875--- lib/lp/registry/doc/projectgroup.txt 2010-12-21 23:57:23 +0000
876+++ lib/lp/registry/doc/projectgroup.txt 2011-06-28 21:36:15 +0000
877@@ -248,12 +248,10 @@
878 If a specification is assigned to series 1.0, it appears in
879 mozilla_1_0_series.all_specifications.
880
881- >>> from canonical.launchpad.ftests import syncUpdate
882 >>> filter = [SpecificationFilter.INFORMATIONAL]
883 >>> extension_manager_upgrades = mozilla.specifications(filter=filter)[0]
884 >>> series_1_0 = firefox.getSeries('1.0')
885 >>> extension_manager_upgrades.proposeGoal(series_1_0, no_priv)
886- >>> syncUpdate(extension_manager_upgrades)
887 >>> for spec in mozilla_series_1_0.all_specifications:
888 ... print spec.name
889 extension-manager-upgrades
890@@ -275,7 +273,6 @@
891
892 >>> for spec in mozilla.all_specifications:
893 ... spec.proposeGoal(series_1_0, no_priv)
894- ... syncUpdate(spec)
895
896 we have the save five incomplete specs in the series 1.0 as we have for the
897 project itself.
898@@ -304,7 +301,6 @@
899
900 >>> firefox = getUtility(IProductSet).getByName('firefox')
901 >>> firefox.active = False
902- >>> syncUpdate(firefox)
903 >>> filter = [SpecificationFilter.INCOMPLETE]
904 >>> mozilla_series_1_0.specifications(filter=filter).count()
905 0
906@@ -312,7 +308,6 @@
907 Reset firefox so we don't mess up later tests.
908
909 >>> firefox.active = True
910- >>> syncUpdate(firefox)
911
912 We can get all the specifications via the all_specifications property,
913 and all valid specifications via the valid_specifications property:
914
915=== modified file 'lib/lp/registry/doc/sourcepackage.txt'
916--- lib/lp/registry/doc/sourcepackage.txt 2011-06-23 13:02:23 +0000
917+++ lib/lp/registry/doc/sourcepackage.txt 2011-06-28 21:36:15 +0000
918@@ -131,13 +131,11 @@
919 >>> from lp.soyuz.model.component import Component
920 >>> from lp.soyuz.model.publishing import (
921 ... SourcePackagePublishingHistory)
922- >>> from canonical.launchpad.ftests import syncUpdate
923
924 >>> latest_publishing = SourcePackagePublishingHistory.get(
925 ... publishing_history[-1].id)
926 >>> universe = Component.byName('universe')
927 >>> latest_publishing.component = universe
928- >>> syncUpdate(latest_publishing)
929 >>> flush_database_caches()
930
931 >>> for release in firefox_warty.distinctreleases:
932@@ -153,7 +151,6 @@
933 >>> from lp.soyuz.enums import PackagePublishingStatus
934
935 >>> latest_publishing.status = PackagePublishingStatus.SUPERSEDED
936- >>> syncUpdate(latest_publishing)
937 >>> print firefox_warty.latest_published_component
938 None
939
940@@ -191,7 +188,6 @@
941
942 >>> from datetime import timedelta
943 >>> pub.dateremoved = pub.datesuperseded + timedelta(days=1)
944- >>> syncUpdate(pub)
945
946 >>> for release in pmount_hoary.releases:
947 ... print release.title, release.publishing_history[0].status.name
948
949=== modified file 'lib/lp/registry/doc/standing.txt'
950--- lib/lp/registry/doc/standing.txt 2011-05-13 16:50:50 +0000
951+++ lib/lp/registry/doc/standing.txt 2011-06-28 21:36:15 +0000
952@@ -15,13 +15,12 @@
953 ... IPersonSet,
954 ... PersonalStanding,
955 ... )
956- >>> from canonical.launchpad.ftests import sync, syncUpdate
957+ >>> from canonical.launchpad.ftests import sync
958
959 >>> person_set = getUtility(IPersonSet)
960 >>> lifeless = person_set.getByName('lifeless')
961 >>> lifeless.personal_standing = PersonalStanding.UNKNOWN
962 >>> lifeless.personal_standing_reason = ''
963- >>> syncUpdate(lifeless)
964
965 # A unique Message-ID generator.
966 >>> from itertools import count
967@@ -53,7 +52,6 @@
968 >>> def lifeless_post(to_team_name):
969 ... return post_message('robertc@robertcollins.net', to_team_name)
970
971- >>> import logging
972 >>> from lp.registry.scripts.standing import (
973 ... UpdatePersonalStanding)
974 >>> from canonical.config import config
975
976=== modified file 'lib/lp/registry/doc/teammembership.txt'
977--- lib/lp/registry/doc/teammembership.txt 2011-05-31 03:49:23 +0000
978+++ lib/lp/registry/doc/teammembership.txt 2011-06-28 21:36:15 +0000
979@@ -796,8 +796,6 @@
980 >>> login_person(karl)
981 >>> karl.renewTeamMembership(mirror_admins)
982
983- >>> from canonical.launchpad.ftests import syncUpdate
984- >>> syncUpdate(karl_on_mirroradmins)
985
986 Now the membership can't be renewed by the member as it's not going to
987 expire soon.
988
989=== modified file 'lib/lp/registry/tests/test_commercialprojects_vocabularies.py'
990--- lib/lp/registry/tests/test_commercialprojects_vocabularies.py 2010-10-04 19:50:45 +0000
991+++ lib/lp/registry/tests/test_commercialprojects_vocabularies.py 2011-06-28 21:36:15 +0000
992@@ -17,7 +17,6 @@
993 ANONYMOUS,
994 login,
995 logout,
996- syncUpdate,
997 )
998 from canonical.launchpad.interfaces.emailaddress import EmailAddressStatus
999 from canonical.testing.layers import LaunchpadFunctionalLayer
1000@@ -56,13 +55,11 @@
1001 licenses=[License.OTHER_PROPRIETARY])
1002 naked_widget = removeSecurityProxy(widget)
1003 naked_widget.owner = self.owner
1004- syncUpdate(naked_widget)
1005 # Create an open source project with a GNU license.
1006 widget = factory.makeProduct(name='openwidget',
1007 licenses=[License.GNU_GPL_V3])
1008 naked_widget = removeSecurityProxy(widget)
1009 naked_widget.owner = self.owner
1010- syncUpdate(naked_widget)
1011
1012 def test_emptySearch(self):
1013 """An empty search should return all commercial projects."""
1014@@ -119,7 +116,6 @@
1015 widget = getUtility(IProductSet).getByName(project_name)
1016 naked_widget = removeSecurityProxy(widget)
1017 naked_widget.licenses = [License.GNU_GPL_V3]
1018- syncUpdate(naked_widget)
1019
1020 # The project is no longer commercial so it is not found.
1021 results = self.vocab.searchForTerms(project_name)
1022
1023=== modified file 'lib/lp/registry/tests/test_product.py'
1024--- lib/lp/registry/tests/test_product.py 2011-03-07 19:05:44 +0000
1025+++ lib/lp/registry/tests/test_product.py 2011-06-28 21:36:15 +0000
1026@@ -11,7 +11,6 @@
1027 import pytz
1028 import transaction
1029
1030-from canonical.launchpad.ftests import syncUpdate
1031 from canonical.launchpad.testing.pages import (
1032 find_main_content,
1033 get_feedback_messages,
1034@@ -250,7 +249,6 @@
1035 (License.ACADEMIC, License.AFFERO))
1036 product_license = ProductLicense(
1037 product=self.product, license=License.PYTHON)
1038- syncUpdate(product_license)
1039 # Cache doesn't see new value.
1040 self.assertEqual(self.product.licenses,
1041 (License.ACADEMIC, License.AFFERO))
1042@@ -262,7 +260,6 @@
1043 transaction.abort()
1044 product_license = ProductLicense(
1045 product=self.product, license=License.MIT)
1046- syncUpdate(product_license)
1047 self.assertEqual(self.product.licenses,
1048 (License.ACADEMIC, License.AFFERO, License.MIT))
1049
1050@@ -278,8 +275,6 @@
1051 purchaser=self.product.owner,
1052 sales_system_id='foo',
1053 whiteboard='bar')
1054- # Cache does not see the change to the database.
1055- syncUpdate(subscription)
1056 self.assertEqual(self.product.commercial_subscription, None)
1057 self.product.redeemSubscriptionVoucher(
1058 'hello', self.product.owner, self.product.owner, 1)
1059@@ -299,7 +294,6 @@
1060 purchaser=self.product.owner,
1061 sales_system_id='new',
1062 whiteboard='')
1063- syncUpdate(subscription)
1064 # Cache is cleared and it sees database changes that occur
1065 # before the cache is populated.
1066 self.assertEqual(self.product.commercial_subscription.sales_system_id,
1067
1068=== modified file 'lib/lp/registry/tests/test_project_milestone.py'
1069--- lib/lp/registry/tests/test_project_milestone.py 2010-11-01 03:32:29 +0000
1070+++ lib/lp/registry/tests/test_project_milestone.py 2011-06-28 21:36:15 +0000
1071@@ -14,7 +14,6 @@
1072
1073 from canonical.launchpad.ftests import (
1074 login,
1075- syncUpdate,
1076 )
1077 from canonical.launchpad.webapp.errorlog import globalErrorUtility
1078 from canonical.testing.layers import (
1079@@ -140,12 +139,10 @@
1080 self.assertEqual(gnome_milestone.dateexpected, None)
1081
1082 evolution_milestone.dateexpected = datetime(2007, 4, 2)
1083- syncUpdate(evolution_milestone)
1084 gnome_milestone = gnome.getMilestone('1.1')
1085 self.assertEqual(gnome_milestone.dateexpected, datetime(2007, 4, 2))
1086
1087 gnomebaker_milestone.dateexpected = datetime(2007, 4, 1)
1088- syncUpdate(gnomebaker_milestone)
1089 gnome_milestone = gnome.getMilestone('1.1')
1090 self.assertEqual(gnome_milestone.dateexpected, datetime(2007, 4, 1))
1091
1092@@ -164,12 +161,10 @@
1093 self.assertEqual(gnome_milestone.active, True)
1094
1095 gnomebaker_milestone.active = False
1096- syncUpdate(gnomebaker_milestone)
1097 gnome_milestone = gnome.getMilestone('1.1')
1098 self.assertEqual(gnome_milestone.active, True)
1099
1100 evolution_milestone.active = False
1101- syncUpdate(evolution_milestone)
1102 gnome_milestone = gnome.getMilestone('1.1')
1103 self.assertEqual(gnome_milestone.active, False)
1104
1105@@ -216,7 +211,6 @@
1106 owner=sample_person,
1107 product=product)
1108 spec.milestone = product.getMilestone(milestone_name)
1109- syncUpdate(spec)
1110 return spec
1111
1112 def test_milestone_specifications(self):
1113@@ -254,7 +248,6 @@
1114 bug = product.createBug(params)
1115 [bugtask] = bug.bugtasks
1116 bugtask.milestone = milestone
1117- syncUpdate(bugtask)
1118
1119 def _createProductSeriesBugtask(self, product_name, product_series_name,
1120 milestone_name):
1121@@ -275,7 +268,6 @@
1122 for bugtask in bug.bugtasks:
1123 if bugtask.productseries is not None:
1124 bugtask.milestone = milestone
1125- syncUpdate(bugtask)
1126
1127 def test_milestone_bugtasks(self):
1128 """Bugtasks and project milestones.
1129@@ -310,7 +302,6 @@
1130 gnomebaker_milestone = self.createProductMilestone(
1131 '1.2', 'gnomebaker', datetime(2011, 4, 2))
1132 gnomebaker_milestone.active = False
1133- syncUpdate(gnomebaker_milestone)
1134
1135 evolution_milestone = self.createProductMilestone(
1136 '1.3', 'evolution', datetime(2012, 4, 1))
1137@@ -318,8 +309,6 @@
1138 gnomebaker_milestone = self.createProductMilestone(
1139 '1.3', 'gnomebaker', datetime(2012, 4, 2))
1140 gnomebaker_milestone.active = False
1141- syncUpdate(evolution_milestone)
1142- syncUpdate(gnomebaker_milestone)
1143
1144 self.createSpecification('1.1', 'evolution')
1145 self.createSpecification('1.1', 'gnomebaker')
1146
1147=== modified file 'lib/lp/services/memcache/doc/restful-cache.txt'
1148--- lib/lp/services/memcache/doc/restful-cache.txt 2010-11-27 23:10:17 +0000
1149+++ lib/lp/services/memcache/doc/restful-cache.txt 2011-06-28 21:36:15 +0000
1150@@ -90,8 +90,8 @@
1151 cache.
1152
1153 >>> person.homepage_content = "Whatever"
1154- >>> from canonical.launchpad.ftests import syncUpdate
1155- >>> syncUpdate(person)
1156+ >>> from storm.store import Store
1157+ >>> Store.of(person).flush()
1158
1159 >>> print cache.get(person, json_type, "beta", default="missing")
1160 missing
1161
1162=== modified file 'lib/lp/soyuz/doc/archive-dependencies.txt'
1163--- lib/lp/soyuz/doc/archive-dependencies.txt 2011-06-11 00:49:33 +0000
1164+++ lib/lp/soyuz/doc/archive-dependencies.txt 2011-06-28 21:36:15 +0000
1165@@ -90,7 +90,6 @@
1166 A proper name for this "model" would be 'cross-component-dependency'.
1167
1168 >>> from canonical.database.sqlbase import flush_database_caches
1169- >>> from canonical.launchpad.ftests import syncUpdate
1170 >>> from lp.soyuz.interfaces.component import IComponentSet
1171
1172 >>> ubuntu_components = [
1173@@ -108,7 +107,6 @@
1174 ... for component in ubuntu_components:
1175 ... component = getUtility(IComponentSet)[component]
1176 ... ogre_pub.component = component
1177- ... syncUpdate(ogre_pub)
1178 ... flush_database_caches()
1179 ... components_term = " ".join(
1180 ... get_components_for_context(
1181@@ -137,7 +135,6 @@
1182
1183 >>> naked_build = removeSecurityProxy(ogre_build)
1184 >>> naked_build.pocket = PackagePublishingPocket.BACKPORTS
1185- >>> syncUpdate(ogre_build)
1186
1187 Ultimately, it means that a build targeted to the BACKPORTS pocket
1188 will behave as if it were published in the multiverse component,
1189
1190=== modified file 'lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt'
1191--- lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt 2010-08-24 15:29:01 +0000
1192+++ lib/lp/soyuz/doc/buildd-queuebuilder-lookup.txt 2011-06-28 21:36:15 +0000
1193@@ -42,14 +42,12 @@
1194
1195 Creating a single source publishing record:
1196
1197- >>> from canonical.launchpad.ftests import syncUpdate
1198 >>> def create_publication(distroseries, pocket, archive, status):
1199- ... pub = SourcePackagePublishingHistory(
1200+ ... SourcePackagePublishingHistory(
1201 ... sourcepackagerelease=the_spr, component=the_spr.component,
1202 ... section=the_spr.section, datecreated=UTC_NOW,
1203 ... distroseries=distroseries, status=status,
1204 ... pocket=pocket, archive=archive)
1205- ... syncUpdate(pub)
1206
1207 Create a collection of source publishing records in different
1208 archives, pockets and statuses. This function creates:
1209
1210=== modified file 'lib/lp/soyuz/doc/distribution.txt'
1211--- lib/lp/soyuz/doc/distribution.txt 2011-06-10 20:23:19 +0000
1212+++ lib/lp/soyuz/doc/distribution.txt 2011-06-28 21:36:15 +0000
1213@@ -167,8 +167,6 @@
1214 Neither in UNAPPROVED:
1215
1216 >>> queue.setUnapproved()
1217- >>> from canonical.launchpad.ftests import syncUpdate
1218- >>> syncUpdate(queue)
1219 >>> queue.status.name
1220 'UNAPPROVED'
1221
1222@@ -178,7 +176,6 @@
1223 Only records in ACCEPTED does:
1224
1225 >>> queue.setAccepted()
1226- >>> syncUpdate(queue)
1227 >>> queue.status.name
1228 'ACCEPTED'
1229
1230@@ -190,7 +187,6 @@
1231 Records in DONE also do not trigger pending-acceptance state in PPAs:
1232
1233 >>> queue.setDone()
1234- >>> syncUpdate(queue)
1235 >>> queue.status.name
1236 'DONE'
1237
1238
1239=== modified file 'lib/lp/soyuz/doc/distroseriesqueue.txt'
1240--- lib/lp/soyuz/doc/distroseriesqueue.txt 2011-06-24 09:41:05 +0000
1241+++ lib/lp/soyuz/doc/distroseriesqueue.txt 2011-06-28 21:36:15 +0000
1242@@ -304,7 +304,6 @@
1243
1244 Performing full acceptance:
1245
1246- >>> from canonical.launchpad.ftests import syncUpdate
1247 >>> items = breezy_autotest.getPackageUploads(PackageUploadStatus.NEW)
1248 >>> for item in items:
1249 ... try:
1250@@ -313,7 +312,6 @@
1251 ... print item.displayname, e
1252 ... else:
1253 ... print item.displayname, item.status.name
1254- ... syncUpdate(item)
1255 netapplet-1.0.0.tar.gz ACCEPTED
1256 netapplet-1.0.0.tar.gz ACCEPTED
1257 alsa-utils ACCEPTED
1258@@ -328,7 +326,6 @@
1259 >>> for item in items:
1260 ... item.setNew()
1261 ... print item.displayname, item.status.name
1262- ... syncUpdate(item)
1263 netapplet-1.0.0.tar.gz NEW
1264 netapplet-1.0.0.tar.gz NEW
1265 alsa-utils NEW
1266
1267=== modified file 'lib/lp/soyuz/doc/queuebuilder.txt'
1268--- lib/lp/soyuz/doc/queuebuilder.txt 2010-12-24 15:52:56 +0000
1269+++ lib/lp/soyuz/doc/queuebuilder.txt 2011-06-28 21:36:15 +0000
1270@@ -274,9 +274,7 @@
1271 publications in PPA context are ignored; they don't result in any
1272 build nor a misleading error in determineArchitectureToBuild.
1273
1274- >>> from canonical.launchpad.ftests import syncUpdate
1275 >>> breezy_autotest_i386.supports_virtualized = False
1276- >>> syncUpdate(breezy_autotest_i386)
1277
1278 >>> pub_breezy_autotest_ppa = test_publisher.getPubSource(
1279 ... sourcename='test-no-ppa-support', version='999',
1280
1281=== modified file 'lib/lp/soyuz/doc/soyuz-set-of-uploads.txt'
1282--- lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2011-06-25 14:39:47 +0000
1283+++ lib/lp/soyuz/doc/soyuz-set-of-uploads.txt 2011-06-28 21:36:15 +0000
1284@@ -161,7 +161,6 @@
1285 >>> from zope.component import getUtility
1286 >>> from canonical.launchpad.ftests import (
1287 ... login,
1288- ... syncUpdate,
1289 ... )
1290 >>> from lp.registry.interfaces.distribution import IDistributionSet
1291
1292@@ -174,7 +173,6 @@
1293 ... status=PackageUploadStatus.ACCEPTED)
1294 ... for item in items:
1295 ... item.realiseUpload()
1296- ... syncUpdate(item)
1297
1298
1299 If an upload of ours ends up in the NEW queue, we need a way to process
1300@@ -188,12 +186,10 @@
1301 ... items = dr.getPackageUploads(status=PackageUploadStatus.NEW)
1302 ... for item in items:
1303 ... item.setAccepted()
1304- ... syncUpdate(item)
1305 ... items = dr.getPackageUploads(
1306 ... status=PackageUploadStatus.UNAPPROVED)
1307 ... for item in items:
1308 ... item.setAccepted()
1309- ... syncUpdate(item)
1310
1311 Finally, as a very simplistic publishing process, we may need to punt any
1312 given upload into the published state, so here's a very simplistic publisher
1313@@ -223,12 +219,10 @@
1314 ... for src in srcs_to_publish:
1315 ... src.status = PPS.PUBLISHED
1316 ... src.datepublished = UTC_NOW
1317- ... syncUpdate(src)
1318 ... published_one = True
1319 ... for bin in bins_to_publish:
1320 ... bin.status = PPS.PUBLISHED
1321 ... bin.datepublished = UTC_NOW
1322- ... syncUpdate(bin)
1323 ... published_one = True
1324 ... return published_one
1325
1326@@ -322,7 +316,6 @@
1327 >>> from lp.registry.interfaces.person import IPersonSet
1328 >>> name16 = getUtility(IPersonSet).getByName('name16')
1329 >>> name16.displayname = "Foo B. Bar"
1330- >>> syncUpdate(name16)
1331
1332 Check the email recipient for displayname containing special chars,
1333 '.', must be rfc2047 compliant:
1334@@ -363,7 +356,6 @@
1335 Revert changes:
1336
1337 >>> name16.displayname = "Foo Bar"
1338- >>> syncUpdate(name16)
1339
1340 Check if we forcibly add the changer as recipient for "sync" uploads,
1341 which contains unsigned changesfile. Ensure it sends email to the
1342
1343=== modified file 'lib/lp/soyuz/stories/soyuz/xx-package-diff.txt'
1344--- lib/lp/soyuz/stories/soyuz/xx-package-diff.txt 2011-03-03 00:43:44 +0000
1345+++ lib/lp/soyuz/stories/soyuz/xx-package-diff.txt 2011-06-28 21:36:15 +0000
1346@@ -98,7 +98,6 @@
1347 >>> from zope.security.proxy import removeSecurityProxy
1348 >>> from StringIO import StringIO
1349 >>> from canonical.database.constants import UTC_NOW
1350- >>> from canonical.launchpad.ftests import syncUpdate
1351 >>> from canonical.librarian.interfaces import ILibrarianClient
1352 >>> from lp.soyuz.enums import PackageDiffStatus
1353
1354@@ -108,7 +107,6 @@
1355 ... naked_diff.status = PackageDiffStatus.COMPLETED
1356 ... naked_diff.diff_content = getUtility(ILibrarianClient).addFile(
1357 ... filename, 3, StringIO('Foo'), 'application/gzipped-patch')
1358- ... syncUpdate(diff)
1359
1360 >>> perform_fake_diff(diff_one, 'biscuit_1.0-1_1.0-2.diff.gz')
1361
1362
1363=== modified file 'lib/lp/soyuz/tests/soyuz.py'
1364--- lib/lp/soyuz/tests/soyuz.py 2010-11-06 12:50:22 +0000
1365+++ lib/lp/soyuz/tests/soyuz.py 2011-06-28 21:36:15 +0000
1366@@ -18,7 +18,6 @@
1367 from canonical.launchpad.database.librarian import LibraryFileAlias
1368 from canonical.launchpad.ftests import (
1369 import_public_test_keys,
1370- syncUpdate,
1371 )
1372 from canonical.launchpad.testing.fakepackager import FakePackager
1373 from canonical.testing.layers import LaunchpadZopelessLayer
1374@@ -104,7 +103,6 @@
1375 pocket=pocket)
1376 # Flush the object changes into DB do guarantee stable database
1377 # ID order as expected in the callsites.
1378- syncUpdate(pub)
1379 sample_pub.append(pub)
1380 return sample_pub
1381
1382@@ -129,7 +127,6 @@
1383 pocket=pocket)
1384 # Flush the object changes into DB do guarantee stable database
1385 # ID order as expected in the callsites.
1386- syncUpdate(pub)
1387 sample_pub.append(pub)
1388 return sample_pub
1389
1390
1391=== modified file 'lib/lp/translations/doc/translationimportqueue.txt'
1392--- lib/lp/translations/doc/translationimportqueue.txt 2011-05-27 19:53:20 +0000
1393+++ lib/lp/translations/doc/translationimportqueue.txt 2011-06-28 21:36:15 +0000
1394@@ -39,7 +39,7 @@
1395 >>> from lp.registry.model.distroseries import DistroSeries
1396 >>> from lp.registry.model.productseries import ProductSeries
1397 >>> from lp.registry.model.sourcepackagename import SourcePackageName
1398- >>> from canonical.launchpad.ftests import login, syncUpdate
1399+ >>> from canonical.launchpad.ftests import login
1400
1401 >>> translationimportqueue = getUtility(ITranslationImportQueue)
1402 >>> rosetta_experts = getUtility(ILaunchpadCelebrities).rosetta_experts
1403@@ -1056,7 +1056,6 @@
1404 Administrators temporarily block translation imports to Warty.
1405
1406 >>> warty_distroseries.defer_translation_imports = True
1407- >>> syncUpdate(warty_distroseries)
1408
1409 While imports are blocked, Warty does not show up as having pending
1410 imports.
1411@@ -1073,7 +1072,6 @@
1412 >>> from lp.testing import unlink_source_packages
1413 >>> unlink_source_packages(firefox)
1414 >>> firefox.active = False
1415- >>> syncUpdate(firefox)
1416
1417 Now that Firefox is inactive, it no longer shows up as having pending
1418 imports.
1419@@ -1086,7 +1084,6 @@
1420 Firefox active again.
1421
1422 >>> firefox.active = True
1423- >>> syncUpdate(firefox)
1424
1425 The import request for Firefox was not removed, so Firefox is listed as
1426 having pending imports again.
1427@@ -1586,14 +1583,11 @@
1428 >>> jokosher = productset['jokosher']
1429 >>> jokosher_trunk = jokosher.getSeries('trunk')
1430 >>> jokosher.translations_usage = ServiceUsage.LAUNCHPAD
1431- >>> syncUpdate(jokosher)
1432 >>> jokosher_subset = potemplateset.getSubset(
1433 ... productseries=jokosher_trunk)
1434 >>> template = jokosher_subset.new(
1435 ... 'jokosher', 'jokosher', 'jokosher.pot', rosetta_experts)
1436- >>> syncUpdate(template)
1437 >>> entry = create_product_request('jokosher', 'jokosher')
1438- >>> syncUpdate(entry)
1439 >>> print_queue_entries(translationimportqueue)
1440 jokosher | jokosher | messages.pot
1441
1442@@ -1608,7 +1602,6 @@
1443 does not satisfy Launchpad policy, and disables it.
1444
1445 >>> jokosher.active = False
1446- >>> syncUpdate(jokosher)
1447
1448 The request is now eligible for purging. Since the Jokosher product is
1449 no longer usable, there is no point in keeping the entry on the queue.
1450
1451=== modified file 'lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py'
1452--- lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py 2010-10-05 00:08:16 +0000
1453+++ lib/lp/translations/scripts/tests/test_copy_distroseries_translations.py 2011-06-28 21:36:15 +0000
1454@@ -13,7 +13,6 @@
1455
1456 from zope.component import getUtility
1457
1458-from canonical.launchpad.ftests import syncUpdate
1459 from canonical.testing.layers import LaunchpadZopelessLayer
1460 from lp.registry.interfaces.distroseries import IDistroSeriesSet
1461 from lp.testing.faketransaction import FakeTransaction
1462@@ -33,7 +32,6 @@
1463
1464 sid.hide_all_translations = True
1465 sid.defer_translation_imports = True
1466- syncUpdate(sid)
1467 copy_distroseries_translations(sid, self.txn, logging)
1468 sid = series_set.findByName('sid')[0]
1469 self.assertTrue(sid.hide_all_translations)
1470@@ -41,7 +39,6 @@
1471
1472 sid.hide_all_translations = True
1473 sid.defer_translation_imports = False
1474- syncUpdate(sid)
1475 copy_distroseries_translations(sid, self.txn, logging)
1476 sid = series_set.findByName('sid')[0]
1477 self.assertTrue(sid.hide_all_translations)
1478@@ -49,7 +46,6 @@
1479
1480 sid.hide_all_translations = False
1481 sid.defer_translation_imports = True
1482- syncUpdate(sid)
1483 copy_distroseries_translations(sid, self.txn, logging)
1484 sid = series_set.findByName('sid')[0]
1485 self.assertFalse(sid.hide_all_translations)
1486@@ -57,7 +53,6 @@
1487
1488 sid.hide_all_translations = False
1489 sid.defer_translation_imports = False
1490- syncUpdate(sid)
1491 copy_distroseries_translations(sid, self.txn, logging)
1492 sid = series_set.findByName('sid')[0]
1493 self.assertFalse(sid.hide_all_translations)
1494
1495=== modified file 'lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt'
1496--- lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2011-05-27 19:53:20 +0000
1497+++ lib/lp/translations/stories/standalone/xx-sourcepackage-export.txt 2011-06-28 21:36:15 +0000
1498@@ -129,8 +129,6 @@
1499 This change gives Gussie the ability to download full package
1500 translations.
1501
1502- >>> from canonical.launchpad.ftests import syncUpdate
1503- >>> syncUpdate(ubuntu)
1504 >>> can_download_translations(gussie_browser)
1505 True
1506