Merge lp:~thumper/launchpad/all-code-review-email-using-jobs into lp:launchpad/db-devel
- all-code-review-email-using-jobs
- Merge into db-devel
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~thumper/launchpad/all-code-review-email-using-jobs |
Merge into: | lp:launchpad/db-devel |
Prerequisite: | lp:~thumper/launchpad/merge-proposal-job-source |
Diff against target: |
1899 lines (+256/-476) 60 files modified
Makefile (+4/-5) configs/development/launchpad-lazr.conf (+2/-2) configs/testrunner/launchpad-lazr.conf (+2/-6) cronscripts/merge-proposal-jobs.py (+22/-30) cronscripts/update_preview_diffs.py (+0/-38) database/schema/security.cfg (+1/-13) lib/canonical/config/schema-lazr.conf (+2/-14) lib/canonical/launchpad/doc/product-update-remote-product-script.txt (+1/-1) lib/lp/answers/doc/expiration.txt (+1/-1) lib/lp/bugs/doc/bugnotification-sending.txt (+1/-1) lib/lp/bugs/doc/bugtask-expiration.txt (+1/-1) lib/lp/bugs/doc/bugtask.txt (+1/-1) lib/lp/bugs/doc/checkwatches.txt (+1/-1) lib/lp/bugs/doc/cve-update.txt (+2/-2) lib/lp/bugs/tests/test_apportjob.py (+1/-1) lib/lp/bugs/tests/test_bugheat.py (+1/-1) lib/lp/code/doc/branch-merge-proposal-notifications.txt (+11/-5) lib/lp/code/doc/codereviewcomment.txt (+6/-12) lib/lp/code/interfaces/branchmergeproposal.py (+4/-3) lib/lp/code/mail/branch.py (+0/-1) lib/lp/code/mail/tests/test_branchmergeproposal.py (+11/-10) lib/lp/code/mail/tests/test_codehandler.py (+11/-13) lib/lp/code/mail/tests/test_codereviewcomment.py (+1/-1) lib/lp/code/model/branchmergeproposal.py (+6/-9) lib/lp/code/model/branchmergeproposaljob.py (+2/-0) lib/lp/code/model/tests/test_branchcloud.py (+4/-3) lib/lp/code/model/tests/test_branchmergeproposaljobs.py (+10/-29) lib/lp/code/model/tests/test_branchmergeproposals.py (+9/-56) lib/lp/code/model/tests/test_diff.py (+4/-0) lib/lp/code/scripts/tests/test_create_merge_proposals.py (+3/-3) lib/lp/code/scripts/tests/test_merge_proposal_jobs.py (+9/-47) lib/lp/code/scripts/tests/test_reclaim_branch_space.py (+3/-4) lib/lp/code/scripts/tests/test_scan_branches.py (+2/-2) lib/lp/code/scripts/tests/test_sendbranchmail.py (+13/-8) lib/lp/code/scripts/tests/test_update_preview_diffs.py (+0/-93) lib/lp/code/scripts/tests/test_upgrade_branches.py (+4/-4) lib/lp/code/tests/helpers.py (+16/-0) lib/lp/codehosting/scanner/tests/test_bzrsync.py (+6/-5) lib/lp/codehosting/scanner/tests/test_mergedetection.py (+16/-4) lib/lp/hardwaredb/doc/hwdb-submission.txt (+4/-4) lib/lp/registry/doc/distribution-mirror.txt (+5/-5) lib/lp/registry/doc/person-karma.txt (+1/-1) lib/lp/registry/doc/sourceforge-remote-products.txt (+1/-1) lib/lp/registry/doc/standing.txt (+2/-2) lib/lp/services/job/tests/test_runner.py (+6/-2) lib/lp/services/mail/sendmail.py (+20/-13) lib/lp/soyuz/doc/buildd-slavescanner.txt (+2/-2) lib/lp/soyuz/doc/gina.txt (+1/-1) lib/lp/soyuz/doc/manage-chroot.txt (+1/-1) lib/lp/soyuz/doc/package-cache-script.txt (+1/-1) lib/lp/soyuz/scripts/tests/test_processupload.py (+1/-1) lib/lp/translations/doc/distroseries-translations-copy.txt (+4/-2) lib/lp/translations/doc/fix_translation_credits.txt (+2/-1) lib/lp/translations/doc/poexport-language-pack.txt (+2/-1) lib/lp/translations/doc/poexport-request.txt (+1/-1) lib/lp/translations/doc/pofile-verify-stats.txt (+2/-2) lib/lp/translations/doc/rosetta-poimport-script.txt (+1/-1) lib/lp/translations/doc/sourcepackagerelease-translations.txt (+3/-2) lib/lp/translations/doc/translations-export-to-branch.txt (+1/-1) lib/lp/translations/scripts/tests/test_translations_to_branch.py (+1/-1) |
To merge this branch: | bzr merge lp:~thumper/launchpad/all-code-review-email-using-jobs |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Review via email: mp+22439@code.launchpad.net |
Commit message
All code review email is now sent using a single job.
Description of the change
This branch is the end of the pipeline.
This is the branch that is going to be merged, and it will be merged
into db-devel, as it is a large change and also landing a change that
would impact edge in such a way that it wouldn't send email is a
"bad thing" (TM).
$ bzr pipes
remove-
code-
new-
bmp-
format-
subscriber-
merge-
* all-code-
This branch is the branch that provides the cronjob to run all the
merge proposal jobs. The old mpcreationjobs.py cronscript is renamed
to merge-proposal-
database permissions and users changed.
The jobs are tested elsewhere, so the script test just makes sure that
the process can start, load its config, access the database, do the query,
produce logging and finish.
Preview Diff
1 | === modified file 'Makefile' | |||
2 | --- Makefile 2010-04-06 21:43:23 +0000 | |||
3 | +++ Makefile 2010-04-07 18:05:36 +0000 | |||
4 | @@ -203,9 +203,9 @@ | |||
5 | 203 | ftest_inplace: inplace | 203 | ftest_inplace: inplace |
6 | 204 | bin/test -f $(TESTFLAGS) $(TESTOPTS) | 204 | bin/test -f $(TESTFLAGS) $(TESTOPTS) |
7 | 205 | 205 | ||
11 | 206 | mpcreationjobs: | 206 | merge-proposal-jobs: |
12 | 207 | # Handle merge proposal creations. | 207 | # Handle merge proposal email jobs. |
13 | 208 | $(PY) cronscripts/mpcreationjobs.py | 208 | $(PY) cronscripts/merge-proposal-jobs.py -v |
14 | 209 | 209 | ||
15 | 210 | run: inplace stop | 210 | run: inplace stop |
16 | 211 | $(RM) thread*.request | 211 | $(RM) thread*.request |
17 | @@ -249,8 +249,7 @@ | |||
18 | 249 | # Scan branches from the filesystem into the database. | 249 | # Scan branches from the filesystem into the database. |
19 | 250 | $(PY) cronscripts/scan_branches.py | 250 | $(PY) cronscripts/scan_branches.py |
20 | 251 | 251 | ||
23 | 252 | 252 | sync_branches: pull_branches scan_branches merge-proposal-jobs | |
22 | 253 | sync_branches: pull_branches scan_branches mpcreationjobs | ||
24 | 254 | 253 | ||
25 | 255 | $(BZR_VERSION_INFO): | 254 | $(BZR_VERSION_INFO): |
26 | 256 | scripts/update-bzr-version-info.sh | 255 | scripts/update-bzr-version-info.sh |
27 | 257 | 256 | ||
28 | === modified file 'configs/development/launchpad-lazr.conf' | |||
29 | --- configs/development/launchpad-lazr.conf 2010-04-06 13:25:20 +0000 | |||
30 | +++ configs/development/launchpad-lazr.conf 2010-04-07 18:05:36 +0000 | |||
31 | @@ -196,9 +196,9 @@ | |||
32 | 196 | port: 11217 | 196 | port: 11217 |
33 | 197 | memory_size: 1 | 197 | memory_size: 1 |
34 | 198 | 198 | ||
36 | 199 | [mpcreationjobs] | 199 | [merge_proposal_jobs] |
37 | 200 | error_dir: /var/tmp/codehosting.test | 200 | error_dir: /var/tmp/codehosting.test |
39 | 201 | oops_prefix: DMPCR | 201 | oops_prefix: DMPJ |
40 | 202 | 202 | ||
41 | 203 | [personalpackagearchive] | 203 | [personalpackagearchive] |
42 | 204 | root: /var/tmp/ppa/ | 204 | root: /var/tmp/ppa/ |
43 | 205 | 205 | ||
44 | === modified file 'configs/testrunner/launchpad-lazr.conf' | |||
45 | --- configs/testrunner/launchpad-lazr.conf 2010-03-30 17:25:52 +0000 | |||
46 | +++ configs/testrunner/launchpad-lazr.conf 2010-04-07 18:05:36 +0000 | |||
47 | @@ -172,12 +172,8 @@ | |||
48 | 172 | # processes spawned through some other mechanism. | 172 | # processes spawned through some other mechanism. |
49 | 173 | port: 11242 | 173 | port: 11242 |
50 | 174 | 174 | ||
57 | 175 | [mpcreationjobs] | 175 | [merge_proposal_jobs] |
58 | 176 | oops_prefix: TMPCJ | 176 | oops_prefix: TMPJ |
53 | 177 | error_dir: /var/tmp/codehosting.test | ||
54 | 178 | |||
55 | 179 | [update_preview_diffs] | ||
56 | 180 | oops_prefix: TUPD | ||
59 | 181 | error_dir: /var/tmp/codehosting.test | 177 | error_dir: /var/tmp/codehosting.test |
60 | 182 | 178 | ||
61 | 183 | [upgrade_branches] | 179 | [upgrade_branches] |
62 | 184 | 180 | ||
63 | === renamed file 'cronscripts/mpcreationjobs.py' => 'cronscripts/merge-proposal-jobs.py' | |||
64 | --- cronscripts/mpcreationjobs.py 2010-02-16 15:25:52 +0000 | |||
65 | +++ cronscripts/merge-proposal-jobs.py 2010-04-07 18:05:36 +0000 | |||
66 | @@ -1,48 +1,40 @@ | |||
67 | 1 | #!/usr/bin/python2.5 -S | 1 | #!/usr/bin/python2.5 -S |
68 | 2 | # | 2 | # |
70 | 3 | # Copyright 2009 Canonical Ltd. This software is licensed under the | 3 | # Copyright 2009, 2010 Canonical Ltd. This software is licensed under the |
71 | 4 | # GNU Affero General Public License version 3 (see the file LICENSE). | 4 | # GNU Affero General Public License version 3 (see the file LICENSE). |
72 | 5 | 5 | ||
73 | 6 | # pylint: disable-msg=W0403 | 6 | # pylint: disable-msg=W0403 |
74 | 7 | 7 | ||
76 | 8 | """Handle new BranchMergeProposals. | 8 | """Handle jobs for BranchMergeProposals. |
77 | 9 | 9 | ||
80 | 10 | This script generates a diff for the merge proposal if needed, then notifies | 10 | This script handles all job types for branch merge proposals. |
79 | 11 | all interested parties about the merge proposal. | ||
81 | 12 | """ | 11 | """ |
82 | 13 | 12 | ||
83 | 14 | __metaclass__ = type | 13 | __metaclass__ = type |
84 | 15 | 14 | ||
85 | 16 | import _pythonpath | 15 | import _pythonpath |
86 | 17 | from zope.component import getUtility | ||
87 | 18 | 16 | ||
91 | 19 | from canonical.config import config | 17 | # The following line is a horrible hack, but unfortunately necessary right now |
92 | 20 | from lp.codehosting.vfs import get_scanner_server | 18 | # to stop import errors from circular imports. |
93 | 21 | from lp.services.job.runner import JobRunner | 19 | import canonical.launchpad.interfaces |
94 | 22 | from lp.code.interfaces.branchmergeproposal import ( | 20 | from lp.code.interfaces.branchmergeproposal import ( |
115 | 23 | IMergeProposalCreatedJobSource,) | 21 | IBranchMergeProposalJobSource, |
116 | 24 | from lp.services.scripts.base import LaunchpadCronScript | 22 | ) |
117 | 25 | from canonical.launchpad.webapp.errorlog import globalErrorUtility | 23 | from lp.services.job.runner import JobCronScript, TwistedJobRunner |
118 | 26 | 24 | ||
119 | 27 | 25 | ||
120 | 28 | class RunMergeProposalCreatedJobs(LaunchpadCronScript): | 26 | class RunMergeProposalJobs(JobCronScript): |
121 | 29 | """Run merge proposal creation jobs.""" | 27 | """Run all merge proposal jobs.""" |
122 | 30 | 28 | ||
123 | 31 | def main(self): | 29 | config_name = 'merge_proposal_jobs' |
124 | 32 | globalErrorUtility.configure('mpcreationjobs') | 30 | source_interface = IBranchMergeProposalJobSource |
125 | 33 | job_source = getUtility(IMergeProposalCreatedJobSource) | 31 | |
126 | 34 | runner = JobRunner.fromReady(job_source, self.logger) | 32 | def __init__(self): |
127 | 35 | server = get_scanner_server() | 33 | super(RunMergeProposalJobs, self).__init__( |
128 | 36 | server.start_server() | 34 | runner_class=TwistedJobRunner, |
129 | 37 | try: | 35 | script_name='merge-proposal-jobs') |
110 | 38 | runner.runAll() | ||
111 | 39 | finally: | ||
112 | 40 | server.stop_server() | ||
113 | 41 | self.logger.info( | ||
114 | 42 | 'Ran %d MergeProposalCreatedJobs.', len(runner.completed_jobs)) | ||
130 | 43 | 36 | ||
131 | 44 | 37 | ||
132 | 45 | if __name__ == '__main__': | 38 | if __name__ == '__main__': |
135 | 46 | script = RunMergeProposalCreatedJobs( | 39 | script = RunMergeProposalJobs() |
134 | 47 | 'mpcreationjobs', config.mpcreationjobs.dbuser) | ||
136 | 48 | script.lock_and_run() | 40 | script.lock_and_run() |
137 | 49 | 41 | ||
138 | === removed file 'cronscripts/update_preview_diffs.py' | |||
139 | --- cronscripts/update_preview_diffs.py 2010-02-16 15:25:52 +0000 | |||
140 | +++ cronscripts/update_preview_diffs.py 1970-01-01 00:00:00 +0000 | |||
141 | @@ -1,38 +0,0 @@ | |||
142 | 1 | #!/usr/bin/python2.5 -S | ||
143 | 2 | # | ||
144 | 3 | # Copyright 2009 Canonical Ltd. This software is licensed under the | ||
145 | 4 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
146 | 5 | |||
147 | 6 | # pylint: disable-msg=W0403 | ||
148 | 7 | |||
149 | 8 | """Update or create previews diffs for branch merge proposals.""" | ||
150 | 9 | |||
151 | 10 | __metaclass__ = type | ||
152 | 11 | |||
153 | 12 | import _pythonpath | ||
154 | 13 | |||
155 | 14 | from lp.services.job.runner import JobCronScript, JobRunner, TwistedJobRunner | ||
156 | 15 | from lp.code.interfaces.branchmergeproposal import ( | ||
157 | 16 | IUpdatePreviewDiffJobSource,) | ||
158 | 17 | |||
159 | 18 | |||
160 | 19 | class RunUpdatePreviewDiffJobs(JobCronScript): | ||
161 | 20 | """Run UpdatePreviewDiff jobs.""" | ||
162 | 21 | |||
163 | 22 | config_name = 'update_preview_diffs' | ||
164 | 23 | source_interface = IUpdatePreviewDiffJobSource | ||
165 | 24 | |||
166 | 25 | def __init__(self): | ||
167 | 26 | super(RunUpdatePreviewDiffJobs, self).__init__() | ||
168 | 27 | if self.options.twisted: | ||
169 | 28 | self.runner_class = TwistedJobRunner | ||
170 | 29 | else: | ||
171 | 30 | self.runner_class = JobRunner | ||
172 | 31 | |||
173 | 32 | def add_my_options(self): | ||
174 | 33 | self.parser.add_option('--twisted', action='store_true') | ||
175 | 34 | |||
176 | 35 | |||
177 | 36 | if __name__ == '__main__': | ||
178 | 37 | script = RunUpdatePreviewDiffJobs() | ||
179 | 38 | script.lock_and_run() | ||
180 | 39 | 0 | ||
181 | === modified file 'database/schema/security.cfg' | |||
182 | --- database/schema/security.cfg 2010-04-05 12:44:46 +0000 | |||
183 | +++ database/schema/security.cfg 2010-04-07 18:05:36 +0000 | |||
184 | @@ -1682,7 +1682,7 @@ | |||
185 | 1682 | public.teamparticipation = SELECT | 1682 | public.teamparticipation = SELECT |
186 | 1683 | public.validpersoncache = SELECT | 1683 | public.validpersoncache = SELECT |
187 | 1684 | 1684 | ||
189 | 1685 | [mp-creation-job] | 1685 | [merge-proposal-jobs] |
190 | 1686 | type=user | 1686 | type=user |
191 | 1687 | groups=script | 1687 | groups=script |
192 | 1688 | public.account = SELECT | 1688 | public.account = SELECT |
193 | @@ -1719,18 +1719,6 @@ | |||
194 | 1719 | public.teamparticipation = SELECT | 1719 | public.teamparticipation = SELECT |
195 | 1720 | public.validpersoncache = SELECT | 1720 | public.validpersoncache = SELECT |
196 | 1721 | 1721 | ||
197 | 1722 | [update-preview-diffs] | ||
198 | 1723 | type=user | ||
199 | 1724 | groups=script | ||
200 | 1725 | public.branch = SELECT | ||
201 | 1726 | public.branchmergeproposal = SELECT, UPDATE | ||
202 | 1727 | public.branchmergeproposaljob = SELECT | ||
203 | 1728 | public.diff = SELECT, INSERT | ||
204 | 1729 | public.job = SELECT, UPDATE | ||
205 | 1730 | public.libraryfilealias = SELECT, INSERT | ||
206 | 1731 | public.libraryfilecontent = SELECT, INSERT | ||
207 | 1732 | public.previewdiff = SELECT, INSERT | ||
208 | 1733 | |||
209 | 1734 | [upgrade-branches] | 1722 | [upgrade-branches] |
210 | 1735 | type=user | 1723 | type=user |
211 | 1736 | groups=script | 1724 | groups=script |
212 | 1737 | 1725 | ||
213 | === modified file 'lib/canonical/config/schema-lazr.conf' | |||
214 | --- lib/canonical/config/schema-lazr.conf 2010-04-07 18:05:11 +0000 | |||
215 | +++ lib/canonical/config/schema-lazr.conf 2010-04-07 18:05:36 +0000 | |||
216 | @@ -1412,10 +1412,10 @@ | |||
217 | 1412 | port: 11217 | 1412 | port: 11217 |
218 | 1413 | 1413 | ||
219 | 1414 | 1414 | ||
221 | 1415 | [mpcreationjobs] | 1415 | [merge_proposal_jobs] |
222 | 1416 | # The database user which will be used by this process. | 1416 | # The database user which will be used by this process. |
223 | 1417 | # datatype: string | 1417 | # datatype: string |
225 | 1418 | dbuser: mp-creation-job | 1418 | dbuser: merge-proposal-jobs |
226 | 1419 | storm_cache: generational | 1419 | storm_cache: generational |
227 | 1420 | storm_cache_size: 500 | 1420 | storm_cache_size: 500 |
228 | 1421 | 1421 | ||
229 | @@ -1428,18 +1428,6 @@ | |||
230 | 1428 | # See [error_reports]. | 1428 | # See [error_reports]. |
231 | 1429 | copy_to_zlog: false | 1429 | copy_to_zlog: false |
232 | 1430 | 1430 | ||
233 | 1431 | [update_preview_diffs] | ||
234 | 1432 | dbuser: update-preview-diffs | ||
235 | 1433 | |||
236 | 1434 | # See [error_reports]. | ||
237 | 1435 | error_dir: none | ||
238 | 1436 | |||
239 | 1437 | # See [error_reports]. | ||
240 | 1438 | oops_prefix: none | ||
241 | 1439 | |||
242 | 1440 | # See [error_reports]. | ||
243 | 1441 | copy_to_zlog: false | ||
244 | 1442 | |||
245 | 1443 | [upgrade_branches] | 1431 | [upgrade_branches] |
246 | 1444 | dbuser: upgrade-branches | 1432 | dbuser: upgrade-branches |
247 | 1445 | 1433 | ||
248 | 1446 | 1434 | ||
249 | === modified file 'lib/canonical/launchpad/doc/product-update-remote-product-script.txt' | |||
250 | --- lib/canonical/launchpad/doc/product-update-remote-product-script.txt 2009-03-27 03:29:31 +0000 | |||
251 | +++ lib/canonical/launchpad/doc/product-update-remote-product-script.txt 2010-04-07 18:05:36 +0000 | |||
252 | @@ -14,7 +14,7 @@ | |||
253 | 14 | 0 | 14 | 0 |
254 | 15 | 15 | ||
255 | 16 | >>> print err | 16 | >>> print err |
257 | 17 | INFO creating lockfile | 17 | INFO Creating lockfile: /var/lock/launchpad-updateremoteproduct.lock |
258 | 18 | INFO 0 projects using BUGZILLA needing updating. | 18 | INFO 0 projects using BUGZILLA needing updating. |
259 | 19 | ... | 19 | ... |
260 | 20 | INFO 0 projects using RT needing updating. | 20 | INFO 0 projects using RT needing updating. |
261 | 21 | 21 | ||
262 | === modified file 'lib/lp/answers/doc/expiration.txt' | |||
263 | --- lib/lp/answers/doc/expiration.txt 2009-07-23 17:49:31 +0000 | |||
264 | +++ lib/lp/answers/doc/expiration.txt 2010-04-07 18:05:36 +0000 | |||
265 | @@ -132,7 +132,7 @@ | |||
266 | 132 | ... stderr=subprocess.PIPE) | 132 | ... stderr=subprocess.PIPE) |
267 | 133 | >>> (out, err) = process.communicate() | 133 | >>> (out, err) = process.communicate() |
268 | 134 | >>> print err | 134 | >>> print err |
270 | 135 | INFO creating lockfile | 135 | INFO Creating lockfile: /var/lock/launchpad-expire-questions.lock |
271 | 136 | INFO Expiring OPEN and NEEDSINFO questions without activity for the | 136 | INFO Expiring OPEN and NEEDSINFO questions without activity for the |
272 | 137 | last 15 days. | 137 | last 15 days. |
273 | 138 | INFO Found 5 questions to expire. | 138 | INFO Found 5 questions to expire. |
274 | 139 | 139 | ||
275 | === modified file 'lib/lp/bugs/doc/bugnotification-sending.txt' | |||
276 | --- lib/lp/bugs/doc/bugnotification-sending.txt 2009-12-24 01:41:54 +0000 | |||
277 | +++ lib/lp/bugs/doc/bugnotification-sending.txt 2010-04-07 18:05:36 +0000 | |||
278 | @@ -984,7 +984,7 @@ | |||
279 | 984 | >>> process.returncode | 984 | >>> process.returncode |
280 | 985 | 0 | 985 | 0 |
281 | 986 | >>> print err | 986 | >>> print err |
283 | 987 | INFO creating lockfile | 987 | INFO Creating lockfile: /var/lock/launchpad-send-bug-notifications.lock |
284 | 988 | INFO Notifying mark@example.com about bug 2. | 988 | INFO Notifying mark@example.com about bug 2. |
285 | 989 | ... | 989 | ... |
286 | 990 | INFO Notifying support@ubuntu.com about bug 2. | 990 | INFO Notifying support@ubuntu.com about bug 2. |
287 | 991 | 991 | ||
288 | === modified file 'lib/lp/bugs/doc/bugtask-expiration.txt' | |||
289 | --- lib/lp/bugs/doc/bugtask-expiration.txt 2009-06-12 16:36:02 +0000 | |||
290 | +++ lib/lp/bugs/doc/bugtask-expiration.txt 2010-04-07 18:05:36 +0000 | |||
291 | @@ -445,7 +445,7 @@ | |||
292 | 445 | ... stderr=subprocess.PIPE) | 445 | ... stderr=subprocess.PIPE) |
293 | 446 | >>> (out, err) = process.communicate() | 446 | >>> (out, err) = process.communicate() |
294 | 447 | >>> print err | 447 | >>> print err |
296 | 448 | INFO creating lockfile | 448 | INFO Creating lockfile: /var/lock/launchpad-expire-bugtasks.lock |
297 | 449 | INFO Expiring unattended, INCOMPLETE bugtasks older than | 449 | INFO Expiring unattended, INCOMPLETE bugtasks older than |
298 | 450 | 60 days for projects that use Launchpad Bugs. | 450 | 60 days for projects that use Launchpad Bugs. |
299 | 451 | INFO Found 3 bugtasks to expire. | 451 | INFO Found 3 bugtasks to expire. |
300 | 452 | 452 | ||
301 | === modified file 'lib/lp/bugs/doc/bugtask.txt' | |||
302 | --- lib/lp/bugs/doc/bugtask.txt 2010-01-21 17:40:23 +0000 | |||
303 | +++ lib/lp/bugs/doc/bugtask.txt 2010-04-07 18:05:36 +0000 | |||
304 | @@ -1104,7 +1104,7 @@ | |||
305 | 1104 | >>> (out, err) = process.communicate() | 1104 | >>> (out, err) = process.communicate() |
306 | 1105 | 1105 | ||
307 | 1106 | >>> print err | 1106 | >>> print err |
309 | 1107 | INFO creating lockfile | 1107 | INFO Creating lockfile: /var/lock/launchpad-launchpad-targetnamecacheupdater.lock |
310 | 1108 | INFO Updating targetname cache of bugtasks. | 1108 | INFO Updating targetname cache of bugtasks. |
311 | 1109 | INFO Updating 1 BugTasks (starting id: 2). | 1109 | INFO Updating 1 BugTasks (starting id: 2). |
312 | 1110 | INFO Updating ...BugTasks... | 1110 | INFO Updating ...BugTasks... |
313 | 1111 | 1111 | ||
314 | === modified file 'lib/lp/bugs/doc/checkwatches.txt' | |||
315 | --- lib/lp/bugs/doc/checkwatches.txt 2010-03-30 17:25:52 +0000 | |||
316 | +++ lib/lp/bugs/doc/checkwatches.txt 2010-04-07 18:05:36 +0000 | |||
317 | @@ -44,7 +44,7 @@ | |||
318 | 44 | 0 | 44 | 0 |
319 | 45 | 45 | ||
320 | 46 | >>> print err | 46 | >>> print err |
322 | 47 | INFO creating lockfile | 47 | INFO Creating lockfile: /var/lock/launchpad-checkwatches.lock |
323 | 48 | DEBUG Using a global batch size of None | 48 | DEBUG Using a global batch size of None |
324 | 49 | DEBUG Skipping updating Ubuntu Bugzilla watches. | 49 | DEBUG Skipping updating Ubuntu Bugzilla watches. |
325 | 50 | DEBUG No watches to update on http://bugs.debian.org | 50 | DEBUG No watches to update on http://bugs.debian.org |
326 | 51 | 51 | ||
327 | === modified file 'lib/lp/bugs/doc/cve-update.txt' | |||
328 | --- lib/lp/bugs/doc/cve-update.txt 2009-06-12 16:36:02 +0000 | |||
329 | +++ lib/lp/bugs/doc/cve-update.txt 2010-04-07 18:05:36 +0000 | |||
330 | @@ -37,7 +37,7 @@ | |||
331 | 37 | ... ) | 37 | ... ) |
332 | 38 | >>> (output, empty) = process.communicate() | 38 | >>> (output, empty) = process.communicate() |
333 | 39 | >>> print output | 39 | >>> print output |
335 | 40 | INFO creating lockfile | 40 | INFO Creating lockfile: /var/lock/launchpad-updatecve.lock |
336 | 41 | ... | 41 | ... |
337 | 42 | INFO CVE-1999-0002 created | 42 | INFO CVE-1999-0002 created |
338 | 43 | INFO Creating new SGI reference for 1999-0002 | 43 | INFO Creating new SGI reference for 1999-0002 |
339 | @@ -91,7 +91,7 @@ | |||
340 | 91 | ... ) | 91 | ... ) |
341 | 92 | >>> (output, empty) = process.communicate() | 92 | >>> (output, empty) = process.communicate() |
342 | 93 | >>> print output | 93 | >>> print output |
344 | 94 | INFO creating lockfile | 94 | INFO Creating lockfile: /var/lock/launchpad-updatecve.lock |
345 | 95 | ... | 95 | ... |
346 | 96 | INFO Creating new CERT reference for 1999-0002 | 96 | INFO Creating new CERT reference for 1999-0002 |
347 | 97 | INFO Creating new CIAC reference for 1999-0002 | 97 | INFO Creating new CIAC reference for 1999-0002 |
348 | 98 | 98 | ||
349 | === modified file 'lib/lp/bugs/tests/test_apportjob.py' | |||
350 | --- lib/lp/bugs/tests/test_apportjob.py 2010-02-26 11:48:40 +0000 | |||
351 | +++ lib/lp/bugs/tests/test_apportjob.py 2010-04-07 18:05:36 +0000 | |||
352 | @@ -272,7 +272,7 @@ | |||
353 | 272 | expect_returncode=0) | 272 | expect_returncode=0) |
354 | 273 | self.assertEqual('', stdout) | 273 | self.assertEqual('', stdout) |
355 | 274 | self.assertIn( | 274 | self.assertIn( |
357 | 275 | 'INFO Ran 1 IProcessApportBlobJobSource jobs.\n', stderr) | 275 | 'INFO Ran 1 ProcessApportBlobJob jobs.\n', stderr) |
358 | 276 | 276 | ||
359 | 277 | def test_getFileBugData(self): | 277 | def test_getFileBugData(self): |
360 | 278 | # The IProcessApportBlobJobSource.getFileBugData() method | 278 | # The IProcessApportBlobJobSource.getFileBugData() method |
361 | 279 | 279 | ||
362 | === modified file 'lib/lp/bugs/tests/test_bugheat.py' | |||
363 | --- lib/lp/bugs/tests/test_bugheat.py 2010-02-25 21:37:02 +0000 | |||
364 | +++ lib/lp/bugs/tests/test_bugheat.py 2010-04-07 18:05:36 +0000 | |||
365 | @@ -96,7 +96,7 @@ | |||
366 | 96 | expect_returncode=0) | 96 | expect_returncode=0) |
367 | 97 | self.assertEqual('', stdout) | 97 | self.assertEqual('', stdout) |
368 | 98 | self.assertIn( | 98 | self.assertIn( |
370 | 99 | 'INFO Ran 1 ICalculateBugHeatJobSource jobs.\n', stderr) | 99 | 'INFO Ran 1 CalculateBugHeatJob jobs.\n', stderr) |
371 | 100 | 100 | ||
372 | 101 | def test_getOopsVars(self): | 101 | def test_getOopsVars(self): |
373 | 102 | # BugJobDerived.getOopsVars() returns the variables to be used | 102 | # BugJobDerived.getOopsVars() returns the variables to be used |
374 | 103 | 103 | ||
375 | === modified file 'lib/lp/code/doc/branch-merge-proposal-notifications.txt' | |||
376 | --- lib/lp/code/doc/branch-merge-proposal-notifications.txt 2010-02-19 02:15:27 +0000 | |||
377 | +++ lib/lp/code/doc/branch-merge-proposal-notifications.txt 2010-04-07 18:05:36 +0000 | |||
378 | @@ -15,7 +15,7 @@ | |||
379 | 15 | ... BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel, | 15 | ... BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel, |
380 | 16 | ... CodeReviewNotificationLevel) | 16 | ... CodeReviewNotificationLevel) |
381 | 17 | >>> from lp.code.interfaces.branchmergeproposal import ( | 17 | >>> from lp.code.interfaces.branchmergeproposal import ( |
383 | 18 | ... IMergeProposalCreatedJobSource) | 18 | ... IBranchMergeProposalJobSource) |
384 | 19 | >>> from lp.code.model.diff import PreviewDiff | 19 | >>> from lp.code.model.diff import PreviewDiff |
385 | 20 | >>> from lp.testing.mail_helpers import pop_notifications | 20 | >>> from lp.testing.mail_helpers import pop_notifications |
386 | 21 | >>> import transaction | 21 | >>> import transaction |
387 | @@ -103,8 +103,11 @@ | |||
388 | 103 | >>> bmp = source_branch.addLandingTarget( | 103 | >>> bmp = source_branch.addLandingTarget( |
389 | 104 | ... registrant, target_branch) | 104 | ... registrant, target_branch) |
390 | 105 | >>> removeSecurityProxy(bmp).preview_diff = preview_diff | 105 | >>> removeSecurityProxy(bmp).preview_diff = preview_diff |
393 | 106 | >>> [job,] = list(getUtility(IMergeProposalCreatedJobSource).iterReady()) | 106 | >>> # Fake the update preview diff as done. |
394 | 107 | >>> job.run(_create_preview=False) | 107 | >>> bmp.next_preview_diff_job.start() |
395 | 108 | >>> bmp.next_preview_diff_job.complete() | ||
396 | 109 | >>> [job] = list(getUtility(IBranchMergeProposalJobSource).iterReady()) | ||
397 | 110 | >>> job.run() | ||
398 | 108 | >>> notifications = pop_notifications( | 111 | >>> notifications = pop_notifications( |
399 | 109 | ... sort_key=lambda n: n.get('X-Envelope-To')) | 112 | ... sort_key=lambda n: n.get('X-Envelope-To')) |
400 | 110 | 113 | ||
401 | @@ -155,8 +158,11 @@ | |||
402 | 155 | ... registrant, target_branch, | 158 | ... registrant, target_branch, |
403 | 156 | ... description=initial_comment, review_requests=reviewers) | 159 | ... description=initial_comment, review_requests=reviewers) |
404 | 157 | >>> removeSecurityProxy(bmp).preview_diff = preview_diff | 160 | >>> removeSecurityProxy(bmp).preview_diff = preview_diff |
407 | 158 | >>> [job,] = list(getUtility(IMergeProposalCreatedJobSource).iterReady()) | 161 | >>> # Fake the update preview diff as done. |
408 | 159 | >>> job.run(_create_preview=False) | 162 | >>> bmp.next_preview_diff_job.start() |
409 | 163 | >>> bmp.next_preview_diff_job.complete() | ||
410 | 164 | >>> [job] = list(getUtility(IBranchMergeProposalJobSource).iterReady()) | ||
411 | 165 | >>> job.run() | ||
412 | 160 | >>> notifications = pop_notifications( | 166 | >>> notifications = pop_notifications( |
413 | 161 | ... sort_key=lambda n: n.get('X-Envelope-To')) | 167 | ... sort_key=lambda n: n.get('X-Envelope-To')) |
414 | 162 | >>> for notification in notifications: | 168 | >>> for notification in notifications: |
415 | 163 | 169 | ||
416 | === modified file 'lib/lp/code/doc/codereviewcomment.txt' | |||
417 | --- lib/lp/code/doc/codereviewcomment.txt 2010-04-07 18:05:11 +0000 | |||
418 | +++ lib/lp/code/doc/codereviewcomment.txt 2010-04-07 18:05:36 +0000 | |||
419 | @@ -48,19 +48,11 @@ | |||
420 | 48 | When comments are added, a job is created to send the emails to the | 48 | When comments are added, a job is created to send the emails to the |
421 | 49 | subscribers of the merge proposal. | 49 | subscribers of the merge proposal. |
422 | 50 | 50 | ||
423 | 51 | >>> from lp.code.interfaces.branchmergeproposal import ( | ||
424 | 52 | ... ICodeReviewCommentEmailJobSource) | ||
425 | 53 | >>> # Needed for now to make the iterReady show the jobs. | 51 | >>> # Needed for now to make the iterReady show the jobs. |
426 | 54 | >>> factory.makeRevisionsForBranch(merge_proposal.source_branch) | 52 | >>> factory.makeRevisionsForBranch(merge_proposal.source_branch) |
436 | 55 | >>> jobs = list(getUtility(ICodeReviewCommentEmailJobSource).iterReady()) | 53 | >>> factory.makeRevisionsForBranch(merge_proposal.target_branch) |
437 | 56 | >>> print len(jobs) | 54 | >>> from lp.code.tests.helpers import mark_all_merge_proposal_jobs_done |
438 | 57 | 3 | 55 | >>> mark_all_merge_proposal_jobs_done() |
430 | 58 | |||
431 | 59 | Since we don't care about these, let's mark them as done. | ||
432 | 60 | |||
433 | 61 | >>> for job in jobs: | ||
434 | 62 | ... job.start() | ||
435 | 63 | ... job.complete() | ||
439 | 64 | 56 | ||
440 | 65 | If there is a subscriber to any of the branches involved in the merge, | 57 | If there is a subscriber to any of the branches involved in the merge, |
441 | 66 | a notification is produced when the comment is created. | 58 | a notification is produced when the comment is created. |
442 | @@ -84,7 +76,9 @@ | |||
443 | 84 | 76 | ||
444 | 85 | Now run the pending job to send the email. | 77 | Now run the pending job to send the email. |
445 | 86 | 78 | ||
447 | 87 | >>> [job] = list(getUtility(ICodeReviewCommentEmailJobSource).iterReady()) | 79 | >>> from lp.code.interfaces.branchmergeproposal import ( |
448 | 80 | ... IBranchMergeProposalJobSource) | ||
449 | 81 | >>> [job] = list(getUtility(IBranchMergeProposalJobSource).iterReady()) | ||
450 | 88 | >>> job.run() | 82 | >>> job.run() |
451 | 89 | 83 | ||
452 | 90 | >>> notifications = pop_notifications() | 84 | >>> notifications = pop_notifications() |
453 | 91 | 85 | ||
454 | === modified file 'lib/lp/code/interfaces/branchmergeproposal.py' | |||
455 | --- lib/lp/code/interfaces/branchmergeproposal.py 2010-04-07 18:05:11 +0000 | |||
456 | +++ lib/lp/code/interfaces/branchmergeproposal.py 2010-04-07 18:05:36 +0000 | |||
457 | @@ -583,7 +583,7 @@ | |||
458 | 583 | """ | 583 | """ |
459 | 584 | 584 | ||
460 | 585 | 585 | ||
462 | 586 | class ICreateMergeProposalJobSource(Interface): | 586 | class ICreateMergeProposalJobSource(IJobSource): |
463 | 587 | """Acquire MergeProposalJobs.""" | 587 | """Acquire MergeProposalJobs.""" |
464 | 588 | 588 | ||
465 | 589 | def create(message_bytes): | 589 | def create(message_bytes): |
466 | @@ -635,7 +635,7 @@ | |||
467 | 635 | """Interface for the job to sends review request emails.""" | 635 | """Interface for the job to sends review request emails.""" |
468 | 636 | 636 | ||
469 | 637 | reviewer = Attribute('The person or team asked to do the review.') | 637 | reviewer = Attribute('The person or team asked to do the review.') |
471 | 638 | requester = Attribute('The person who as asked for the review.') | 638 | requester = Attribute('The person who has asked for the review.') |
472 | 639 | 639 | ||
473 | 640 | 640 | ||
474 | 641 | class IReviewRequestedEmailJobSource(Interface): | 641 | class IReviewRequestedEmailJobSource(Interface): |
475 | @@ -652,7 +652,8 @@ | |||
476 | 652 | """Interface for the job to sends email about merge proposal updates.""" | 652 | """Interface for the job to sends email about merge proposal updates.""" |
477 | 653 | 653 | ||
478 | 654 | editor = Attribute('The person that did the editing.') | 654 | editor = Attribute('The person that did the editing.') |
480 | 655 | delta_text = Attribute('The textual representation of the changed fields.') | 655 | delta_text = Attribute( |
481 | 656 | 'The textual representation of the changed fields.') | ||
482 | 656 | 657 | ||
483 | 657 | 658 | ||
484 | 658 | class IMergeProposalUpdatedEmailJobSource(Interface): | 659 | class IMergeProposalUpdatedEmailJobSource(Interface): |
485 | 659 | 660 | ||
486 | === modified file 'lib/lp/code/mail/branch.py' | |||
487 | --- lib/lp/code/mail/branch.py 2010-04-07 18:05:11 +0000 | |||
488 | +++ lib/lp/code/mail/branch.py 2010-04-07 18:05:36 +0000 | |||
489 | @@ -92,7 +92,6 @@ | |||
490 | 92 | 92 | ||
491 | 93 | The registrant will be the sole recipient. | 93 | The registrant will be the sole recipient. |
492 | 94 | """ | 94 | """ |
493 | 95 | branch = merge_proposal.source_branch | ||
494 | 96 | reason_template = 'You proposed %(branch_name)s for merging.' | 95 | reason_template = 'You proposed %(branch_name)s for merging.' |
495 | 97 | return cls(merge_proposal.registrant, merge_proposal.registrant, | 96 | return cls(merge_proposal.registrant, merge_proposal.registrant, |
496 | 98 | merge_proposal.source_branch, | 97 | merge_proposal.source_branch, |
497 | 99 | 98 | ||
498 | === modified file 'lib/lp/code/mail/tests/test_branchmergeproposal.py' | |||
499 | --- lib/lp/code/mail/tests/test_branchmergeproposal.py 2010-04-07 18:05:11 +0000 | |||
500 | +++ lib/lp/code/mail/tests/test_branchmergeproposal.py 2010-04-07 18:05:36 +0000 | |||
501 | @@ -4,9 +4,10 @@ | |||
502 | 4 | """Tests for BranchMergeProposal mailings""" | 4 | """Tests for BranchMergeProposal mailings""" |
503 | 5 | 5 | ||
504 | 6 | from difflib import unified_diff | 6 | from difflib import unified_diff |
506 | 7 | from unittest import TestLoader | 7 | import operator |
507 | 8 | from textwrap import dedent | 8 | from textwrap import dedent |
508 | 9 | import transaction | 9 | import transaction |
509 | 10 | from unittest import TestLoader | ||
510 | 10 | 11 | ||
511 | 11 | from zope.security.proxy import removeSecurityProxy | 12 | from zope.security.proxy import removeSecurityProxy |
512 | 12 | 13 | ||
513 | @@ -339,7 +340,8 @@ | |||
514 | 339 | job, subscriber = self.makeProposalUpdatedEmailJob() | 340 | job, subscriber = self.makeProposalUpdatedEmailJob() |
515 | 340 | pop_notifications() | 341 | pop_notifications() |
516 | 341 | job.run() | 342 | job.run() |
518 | 342 | emails = pop_notifications() | 343 | emails = pop_notifications( |
519 | 344 | sort_key=operator.itemgetter('x-launchpad-message-rationale')) | ||
520 | 343 | self.assertEqual(3, len(emails), | 345 | self.assertEqual(3, len(emails), |
521 | 344 | 'There should be three emails sent out. One to the ' | 346 | 'There should be three emails sent out. One to the ' |
522 | 345 | 'explicit subscriber above, and one each to the ' | 347 | 'explicit subscriber above, and one each to the ' |
523 | @@ -349,7 +351,7 @@ | |||
524 | 349 | self.assertEqual('[Merge] ' | 351 | self.assertEqual('[Merge] ' |
525 | 350 | 'lp://dev/~bob/super-product/fix-foo-for-bar into\n\t' | 352 | 'lp://dev/~bob/super-product/fix-foo-for-bar into\n\t' |
526 | 351 | 'lp://dev/~mary/super-product/bar', email['subject']) | 353 | 'lp://dev/~mary/super-product/bar', email['subject']) |
528 | 352 | self.assertEqual(dedent("""\ | 354 | expected = dedent("""\ |
529 | 353 | The proposal to merge lp://dev/~bob/super-product/fix-foo-for-bar into lp://dev/~mary/super-product/bar has been updated. | 355 | The proposal to merge lp://dev/~bob/super-product/fix-foo-for-bar into lp://dev/~mary/super-product/bar has been updated. |
530 | 354 | 356 | ||
531 | 355 | Status: Work in progress => Needs review | 357 | Status: Work in progress => Needs review |
532 | @@ -363,9 +365,9 @@ | |||
533 | 363 | change description | 365 | change description |
534 | 364 | --\x20 | 366 | --\x20 |
535 | 365 | %s | 367 | %s |
539 | 366 | You are subscribed to branch lp://dev/~bob/super-product/fix-foo-for-bar. | 368 | You are the owner of lp://dev/~bob/super-product/fix-foo-for-bar. |
540 | 367 | """) % canonical_url(job.branch_merge_proposal), | 369 | """) % canonical_url(job.branch_merge_proposal) |
541 | 368 | email.get_payload(decode=True)) | 370 | self.assertEqual(expected, email.get_payload(decode=True)) |
542 | 369 | 371 | ||
543 | 370 | def assertRecipientsMatches(self, recipients, mailer): | 372 | def assertRecipientsMatches(self, recipients, mailer): |
544 | 371 | """Assert that `mailer` will send to the people in `recipients`.""" | 373 | """Assert that `mailer` will send to the people in `recipients`.""" |
545 | @@ -468,8 +470,7 @@ | |||
546 | 468 | review_request_job = self.getReviewNotificationEmail() | 470 | review_request_job = self.getReviewNotificationEmail() |
547 | 469 | review_request_job.run() | 471 | review_request_job.run() |
548 | 470 | [sent_mail] = pop_notifications() | 472 | [sent_mail] = pop_notifications() |
551 | 471 | self.assertEqual( | 473 | expected = dedent("""\ |
550 | 472 | dedent("""\ | ||
552 | 473 | You have been requested to review the proposed merge of %(source)s into %(target)s. | 474 | You have been requested to review the proposed merge of %(source)s into %(target)s. |
553 | 474 | 475 | ||
554 | 475 | This branch is awesome. | 476 | This branch is awesome. |
555 | @@ -480,8 +481,8 @@ | |||
556 | 480 | """ % { | 481 | """ % { |
557 | 481 | 'source': self.bmp.source_branch.bzr_identity, | 482 | 'source': self.bmp.source_branch.bzr_identity, |
558 | 482 | 'target': self.bmp.target_branch.bzr_identity, | 483 | 'target': self.bmp.target_branch.bzr_identity, |
561 | 483 | 'bmp': canonical_url(self.bmp)}), | 484 | 'bmp': canonical_url(self.bmp)}) |
562 | 484 | sent_mail.get_payload(decode=True)) | 485 | self.assertEqual(expected, sent_mail.get_payload(decode=True)) |
563 | 485 | 486 | ||
564 | 486 | def test_nominateReview_emails_team_address(self): | 487 | def test_nominateReview_emails_team_address(self): |
565 | 487 | # If a review request is made for a team, the members of the team are | 488 | # If a review request is made for a team, the members of the team are |
566 | 488 | 489 | ||
567 | === modified file 'lib/lp/code/mail/tests/test_codehandler.py' | |||
568 | --- lib/lp/code/mail/tests/test_codehandler.py 2010-04-07 18:05:11 +0000 | |||
569 | +++ lib/lp/code/mail/tests/test_codehandler.py 2010-04-07 18:05:36 +0000 | |||
570 | @@ -27,7 +27,6 @@ | |||
571 | 27 | from canonical.launchpad.interfaces.mail import ( | 27 | from canonical.launchpad.interfaces.mail import ( |
572 | 28 | EmailProcessingError, IWeaklyAuthenticatedPrincipal) | 28 | EmailProcessingError, IWeaklyAuthenticatedPrincipal) |
573 | 29 | from canonical.launchpad.mail.handlers import mail_handlers | 29 | from canonical.launchpad.mail.handlers import mail_handlers |
574 | 30 | from canonical.launchpad.webapp import canonical_url | ||
575 | 31 | from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy | 30 | from canonical.launchpad.webapp.authorization import LaunchpadSecurityPolicy |
576 | 32 | from canonical.launchpad.webapp.interaction import ( | 31 | from canonical.launchpad.webapp.interaction import ( |
577 | 33 | get_current_principal, setupInteraction) | 32 | get_current_principal, setupInteraction) |
578 | @@ -158,7 +157,7 @@ | |||
579 | 158 | self.assertTrue(self.code_handler.process( | 157 | self.assertTrue(self.code_handler.process( |
580 | 159 | mail, email_addr, None), "Succeeded, but didn't return True") | 158 | mail, email_addr, None), "Succeeded, but didn't return True") |
581 | 160 | # if the message has not been created, this raises SQLObjectNotFound | 159 | # if the message has not been created, this raises SQLObjectNotFound |
583 | 161 | message = MessageSet().get('<my-id>') | 160 | MessageSet().get('<my-id>') |
584 | 162 | 161 | ||
585 | 163 | def test_process_packagebranch(self): | 162 | def test_process_packagebranch(self): |
586 | 164 | """Processing an email related to a package branch works..""" | 163 | """Processing an email related to a package branch works..""" |
587 | @@ -407,7 +406,7 @@ | |||
588 | 407 | md = self.factory.makeMergeDirective( | 406 | md = self.factory.makeMergeDirective( |
589 | 408 | source_branch_url=source_branch_url, target_branch=target_branch) | 407 | source_branch_url=source_branch_url, target_branch=target_branch) |
590 | 409 | submitter = self.factory.makePerson() | 408 | submitter = self.factory.makePerson() |
592 | 410 | duplicate_branch = self.factory.makeProductBranch( | 409 | self.factory.makeProductBranch( |
593 | 411 | product=target_branch.product, name='suffix', owner=submitter) | 410 | product=target_branch.product, name='suffix', owner=submitter) |
594 | 412 | self.switchDbUser(config.create_merge_proposals.dbuser) | 411 | self.switchDbUser(config.create_merge_proposals.dbuser) |
595 | 413 | mp_source, mp_target = self.code_handler._acquireBranchesForProposal( | 412 | mp_source, mp_target = self.code_handler._acquireBranchesForProposal( |
596 | @@ -488,7 +487,6 @@ | |||
597 | 488 | 487 | ||
598 | 489 | MissingMergeDirective is raised when no merge directive is present. | 488 | MissingMergeDirective is raised when no merge directive is present. |
599 | 490 | """ | 489 | """ |
600 | 491 | md = self.factory.makeMergeDirective() | ||
601 | 492 | message = self.factory.makeSignedMessage(body='Hi!\n') | 490 | message = self.factory.makeSignedMessage(body='Hi!\n') |
602 | 493 | self.switchDbUser(config.processmail.dbuser) | 491 | self.switchDbUser(config.processmail.dbuser) |
603 | 494 | code_handler = CodeHandler() | 492 | code_handler = CodeHandler() |
604 | @@ -683,10 +681,10 @@ | |||
605 | 683 | self.factory.makeMergeDirectiveEmail()) | 681 | self.factory.makeMergeDirectiveEmail()) |
606 | 684 | self.switchDbUser(config.create_merge_proposals.dbuser) | 682 | self.switchDbUser(config.create_merge_proposals.dbuser) |
607 | 685 | code_handler = CodeHandler() | 683 | code_handler = CodeHandler() |
610 | 686 | bmp = code_handler.processMergeProposal(message) | 684 | code_handler.processMergeProposal(message) |
611 | 687 | _unused = pop_notifications() | 685 | pop_notifications() |
612 | 688 | transaction.commit() | 686 | transaction.commit() |
614 | 689 | _unused = code_handler.processMergeProposal(message) | 687 | code_handler.processMergeProposal(message) |
615 | 690 | [notification] = pop_notifications() | 688 | [notification] = pop_notifications() |
616 | 691 | self.assertEqual( | 689 | self.assertEqual( |
617 | 692 | notification['Subject'], 'Error Creating Merge Proposal') | 690 | notification['Subject'], 'Error Creating Merge Proposal') |
618 | @@ -757,8 +755,8 @@ | |||
619 | 757 | """If an LP URL is provided, we attempt to reproduce it exactly.""" | 755 | """If an LP URL is provided, we attempt to reproduce it exactly.""" |
620 | 758 | submitter = self.factory.makePerson(name='merge-submitter') | 756 | submitter = self.factory.makePerson(name='merge-submitter') |
621 | 759 | target = self.makeTargetBranch() | 757 | target = self.makeTargetBranch() |
624 | 760 | url_product = self.factory.makeProduct('uproduct') | 758 | self.factory.makeProduct('uproduct') |
625 | 761 | url_person = self.factory.makePerson(name='uuser') | 759 | self.factory.makePerson(name='uuser') |
626 | 762 | code_handler = CodeHandler() | 760 | code_handler = CodeHandler() |
627 | 763 | namespace, base = code_handler._getNewBranchInfo( | 761 | namespace, base = code_handler._getNewBranchInfo( |
628 | 764 | config.codehosting.supermirror_root + '~uuser/uproduct/bar', | 762 | config.codehosting.supermirror_root + '~uuser/uproduct/bar', |
629 | @@ -770,8 +768,8 @@ | |||
630 | 770 | """Trailing slashes are permitted in LP URLs.""" | 768 | """Trailing slashes are permitted in LP URLs.""" |
631 | 771 | submitter = self.factory.makePerson(name='merge-submitter') | 769 | submitter = self.factory.makePerson(name='merge-submitter') |
632 | 772 | target = self.makeTargetBranch() | 770 | target = self.makeTargetBranch() |
635 | 773 | url_product = self.factory.makeProduct('uproduct') | 771 | self.factory.makeProduct('uproduct') |
636 | 774 | url_person = self.factory.makePerson(name='uuser') | 772 | self.factory.makePerson(name='uuser') |
637 | 775 | code_handler = CodeHandler() | 773 | code_handler = CodeHandler() |
638 | 776 | namespace, base = code_handler._getNewBranchInfo( | 774 | namespace, base = code_handler._getNewBranchInfo( |
639 | 777 | config.codehosting.supermirror_root + '~uuser/uproduct/bar/', | 775 | config.codehosting.supermirror_root + '~uuser/uproduct/bar/', |
640 | @@ -812,7 +810,7 @@ | |||
641 | 812 | body=' review abstain', | 810 | body=' review abstain', |
642 | 813 | subject='') | 811 | subject='') |
643 | 814 | bmp = self.factory.makeBranchMergeProposal() | 812 | bmp = self.factory.makeBranchMergeProposal() |
645 | 815 | _unused = pop_notifications() | 813 | pop_notifications() |
646 | 816 | email_addr = bmp.address | 814 | email_addr = bmp.address |
647 | 817 | self.switchDbUser(config.processmail.dbuser) | 815 | self.switchDbUser(config.processmail.dbuser) |
648 | 818 | self.code_handler.process(mail, email_addr, None) | 816 | self.code_handler.process(mail, email_addr, None) |
649 | @@ -955,7 +953,7 @@ | |||
650 | 955 | format="1.9") | 953 | format="1.9") |
651 | 956 | bmp = self._processMergeDirective(message) | 954 | bmp = self._processMergeDirective(message) |
652 | 957 | # The hosted location should be populated (open succeeds). | 955 | # The hosted location should be populated (open succeeds). |
654 | 958 | source_bzr_branch = self._openBazaarBranchAsClient(bmp.source_branch) | 956 | self._openBazaarBranchAsClient(bmp.source_branch) |
655 | 959 | # Not the mirror (open raises). | 957 | # Not the mirror (open raises). |
656 | 960 | self.assertRaises( | 958 | self.assertRaises( |
657 | 961 | bzr_errors.NotBranchError, Branch.open, | 959 | bzr_errors.NotBranchError, Branch.open, |
658 | 962 | 960 | ||
659 | === modified file 'lib/lp/code/mail/tests/test_codereviewcomment.py' | |||
660 | --- lib/lp/code/mail/tests/test_codereviewcomment.py 2010-04-07 18:05:11 +0000 | |||
661 | +++ lib/lp/code/mail/tests/test_codereviewcomment.py 2010-04-07 18:05:36 +0000 | |||
662 | @@ -18,7 +18,7 @@ | |||
663 | 18 | BranchSubscriptionNotificationLevel, CodeReviewNotificationLevel, | 18 | BranchSubscriptionNotificationLevel, CodeReviewNotificationLevel, |
664 | 19 | CodeReviewVote) | 19 | CodeReviewVote) |
665 | 20 | from lp.code.mail.codereviewcomment import CodeReviewCommentMailer | 20 | from lp.code.mail.codereviewcomment import CodeReviewCommentMailer |
667 | 21 | from lp.testing import ANONYMOUS, login, login_person, TestCaseWithFactory | 21 | from lp.testing import login, login_person, TestCaseWithFactory |
668 | 22 | 22 | ||
669 | 23 | 23 | ||
670 | 24 | class TestCodeReviewComment(TestCaseWithFactory): | 24 | class TestCodeReviewComment(TestCaseWithFactory): |
671 | 25 | 25 | ||
672 | === modified file 'lib/lp/code/model/branchmergeproposal.py' | |||
673 | --- lib/lp/code/model/branchmergeproposal.py 2010-04-07 18:05:11 +0000 | |||
674 | +++ lib/lp/code/model/branchmergeproposal.py 2010-04-07 18:05:36 +0000 | |||
675 | @@ -141,21 +141,18 @@ | |||
676 | 141 | def next_preview_diff_job(self): | 141 | def next_preview_diff_job(self): |
677 | 142 | # circular dependencies | 142 | # circular dependencies |
678 | 143 | from lp.code.model.branchmergeproposaljob import ( | 143 | from lp.code.model.branchmergeproposaljob import ( |
685 | 144 | BranchMergeProposalJob, MergeProposalCreatedJob, | 144 | BranchMergeProposalJob, BranchMergeProposalJobFactory, |
686 | 145 | UpdatePreviewDiffJob) | 145 | BranchMergeProposalJobType) |
681 | 146 | job_classes = [MergeProposalCreatedJob, UpdatePreviewDiffJob] | ||
682 | 147 | type_classes = dict( | ||
683 | 148 | (job_class.class_job_type, job_class) | ||
684 | 149 | for job_class in job_classes) | ||
687 | 150 | job = Store.of(self).find( | 146 | job = Store.of(self).find( |
688 | 151 | BranchMergeProposalJob, | 147 | BranchMergeProposalJob, |
689 | 152 | BranchMergeProposalJob.branch_merge_proposal == self, | 148 | BranchMergeProposalJob.branch_merge_proposal == self, |
691 | 153 | BranchMergeProposalJob.job_type.is_in(type_classes.keys()), | 149 | BranchMergeProposalJob.job_type == |
692 | 150 | BranchMergeProposalJobType.UPDATE_PREVIEW_DIFF, | ||
693 | 154 | BranchMergeProposalJob.job == Job.id, | 151 | BranchMergeProposalJob.job == Job.id, |
694 | 155 | Job._status.is_in([JobStatus.WAITING, JobStatus.RUNNING]) | 152 | Job._status.is_in([JobStatus.WAITING, JobStatus.RUNNING]) |
695 | 156 | ).order_by(Job.scheduled_start, Job.date_created).first() | 153 | ).order_by(Job.scheduled_start, Job.date_created).first() |
696 | 157 | if job is not None: | 154 | if job is not None: |
698 | 158 | return type_classes[job.job_type](job) | 155 | return BranchMergeProposalJobFactory.create(job) |
699 | 159 | else: | 156 | else: |
700 | 160 | return None | 157 | return None |
701 | 161 | 158 | ||
702 | @@ -620,7 +617,7 @@ | |||
703 | 620 | message = Message( | 617 | message = Message( |
704 | 621 | parent=parent_message, owner=owner, rfc822msgid=msgid, | 618 | parent=parent_message, owner=owner, rfc822msgid=msgid, |
705 | 622 | subject=subject, datecreated=_date_created) | 619 | subject=subject, datecreated=_date_created) |
707 | 623 | chunk = MessageChunk(message=message, content=content, sequence=1) | 620 | MessageChunk(message=message, content=content, sequence=1) |
708 | 624 | return self.createCommentFromMessage( | 621 | return self.createCommentFromMessage( |
709 | 625 | message, vote, review_type, original_email=None, | 622 | message, vote, review_type, original_email=None, |
710 | 626 | _notify_listeners=_notify_listeners, _validate=False) | 623 | _notify_listeners=_notify_listeners, _validate=False) |
711 | 627 | 624 | ||
712 | === modified file 'lib/lp/code/model/branchmergeproposaljob.py' | |||
713 | --- lib/lp/code/model/branchmergeproposaljob.py 2010-04-07 18:05:11 +0000 | |||
714 | +++ lib/lp/code/model/branchmergeproposaljob.py 2010-04-07 18:05:36 +0000 | |||
715 | @@ -17,7 +17,9 @@ | |||
716 | 17 | 17 | ||
717 | 18 | __all__ = [ | 18 | __all__ = [ |
718 | 19 | 'BranchMergeProposalJob', | 19 | 'BranchMergeProposalJob', |
719 | 20 | 'BranchMergeProposalJobFactory', | ||
720 | 20 | 'BranchMergeProposalJobSource', | 21 | 'BranchMergeProposalJobSource', |
721 | 22 | 'BranchMergeProposalJobType', | ||
722 | 21 | 'CodeReviewCommentEmailJob', | 23 | 'CodeReviewCommentEmailJob', |
723 | 22 | 'CreateMergeProposalJob', | 24 | 'CreateMergeProposalJob', |
724 | 23 | 'MergeProposalCreatedJob', | 25 | 'MergeProposalCreatedJob', |
725 | 24 | 26 | ||
726 | === modified file 'lib/lp/code/model/tests/test_branchcloud.py' | |||
727 | --- lib/lp/code/model/tests/test_branchcloud.py 2009-06-30 16:56:07 +0000 | |||
728 | +++ lib/lp/code/model/tests/test_branchcloud.py 2010-04-07 18:05:36 +0000 | |||
729 | @@ -55,9 +55,10 @@ | |||
730 | 55 | date_generator = time_counter(start_date, delta) | 55 | date_generator = time_counter(start_date, delta) |
731 | 56 | branch = self.factory.makeProductBranch( | 56 | branch = self.factory.makeProductBranch( |
732 | 57 | product=product, branch_type=branch_type, private=private) | 57 | product=product, branch_type=branch_type, private=private) |
736 | 58 | self.factory.makeRevisionsForBranch( | 58 | if branch_type != BranchType.REMOTE: |
737 | 59 | removeSecurityProxy(branch), count=revision_count, | 59 | self.factory.makeRevisionsForBranch( |
738 | 60 | date_generator=date_generator) | 60 | removeSecurityProxy(branch), count=revision_count, |
739 | 61 | date_generator=date_generator) | ||
740 | 61 | return branch | 62 | return branch |
741 | 62 | 63 | ||
742 | 63 | def test_empty_with_no_branches(self): | 64 | def test_empty_with_no_branches(self): |
743 | 64 | 65 | ||
744 | === modified file 'lib/lp/code/model/tests/test_branchmergeproposaljobs.py' | |||
745 | --- lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2010-04-07 18:05:11 +0000 | |||
746 | +++ lib/lp/code/model/tests/test_branchmergeproposaljobs.py 2010-04-07 18:05:36 +0000 | |||
747 | @@ -87,33 +87,6 @@ | |||
748 | 87 | verifyObject(IMergeProposalCreatedJob, job) | 87 | verifyObject(IMergeProposalCreatedJob, job) |
749 | 88 | verifyObject(IBranchMergeProposalJob, job) | 88 | verifyObject(IBranchMergeProposalJob, job) |
750 | 89 | 89 | ||
751 | 90 | def test_run_makes_diff(self): | ||
752 | 91 | """MergeProposalCreationJob.run creates a diff.""" | ||
753 | 92 | self.useBzrBranches() | ||
754 | 93 | target, target_tree = self.create_branch_and_tree('target') | ||
755 | 94 | target_tree.bzrdir.root_transport.put_bytes('foo', 'foo\n') | ||
756 | 95 | target_tree.add('foo') | ||
757 | 96 | rev1 = target_tree.commit('added foo') | ||
758 | 97 | source, source_tree = self.create_branch_and_tree('source') | ||
759 | 98 | source_tree.pull(target_tree.branch, stop_revision=rev1) | ||
760 | 99 | source_tree.bzrdir.root_transport.put_bytes('foo', 'foo\nbar\n') | ||
761 | 100 | source_tree.commit('added bar') | ||
762 | 101 | target_tree.merge_from_branch(source_tree.branch) | ||
763 | 102 | target_tree.commit('merged from source') | ||
764 | 103 | source_tree.bzrdir.root_transport.put_bytes('foo', 'foo\nbar\nqux\n') | ||
765 | 104 | source_tree.commit('added qux') | ||
766 | 105 | bmp = self.factory.makeBranchMergeProposal( | ||
767 | 106 | source_branch=source, target_branch=target, | ||
768 | 107 | registrant=source.owner) | ||
769 | 108 | job = MergeProposalCreatedJob.create(bmp) | ||
770 | 109 | transaction.commit() | ||
771 | 110 | self.layer.switchDbUser(config.merge_proposal_jobs.dbuser) | ||
772 | 111 | job.run() | ||
773 | 112 | self.assertIs(None, bmp.review_diff) | ||
774 | 113 | self.assertIsNot(None, bmp.preview_diff) | ||
775 | 114 | transaction.commit() | ||
776 | 115 | self.checkDiff(bmp.preview_diff) | ||
777 | 116 | |||
778 | 117 | def checkDiff(self, diff): | 90 | def checkDiff(self, diff): |
779 | 118 | self.assertNotIn('+bar', diff.diff.text) | 91 | self.assertNotIn('+bar', diff.diff.text) |
780 | 119 | self.assertIn('+qux', diff.diff.text) | 92 | self.assertIn('+qux', diff.diff.text) |
781 | @@ -174,12 +147,12 @@ | |||
782 | 174 | def test_run(self): | 147 | def test_run(self): |
783 | 175 | self.useBzrBranches() | 148 | self.useBzrBranches() |
784 | 176 | bmp = self.createExampleMerge()[0] | 149 | bmp = self.createExampleMerge()[0] |
786 | 177 | UpdatePreviewDiffJob.create(bmp) | 150 | job = UpdatePreviewDiffJob.create(bmp) |
787 | 178 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) | 151 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) |
788 | 179 | bmp.source_branch.next_mirror_time = None | 152 | bmp.source_branch.next_mirror_time = None |
789 | 180 | transaction.commit() | 153 | transaction.commit() |
790 | 181 | self.layer.switchDbUser(config.merge_proposal_jobs.dbuser) | 154 | self.layer.switchDbUser(config.merge_proposal_jobs.dbuser) |
792 | 182 | JobRunner.fromReady(UpdatePreviewDiffJob).runAll() | 155 | JobRunner([job]).runAll() |
793 | 183 | transaction.commit() | 156 | transaction.commit() |
794 | 184 | self.checkExampleMerge(bmp.preview_diff.text) | 157 | self.checkExampleMerge(bmp.preview_diff.text) |
795 | 185 | 158 | ||
796 | @@ -205,6 +178,14 @@ | |||
797 | 205 | 'The source branch has no revisions.', | 178 | 'The source branch has no revisions.', |
798 | 206 | email.get_payload(decode=True)) | 179 | email.get_payload(decode=True)) |
799 | 207 | 180 | ||
800 | 181 | def test_10_minute_lease(self): | ||
801 | 182 | self.useBzrBranches() | ||
802 | 183 | bmp = self.createExampleMerge()[0] | ||
803 | 184 | job = UpdatePreviewDiffJob.create(bmp) | ||
804 | 185 | job.acquireLease() | ||
805 | 186 | expiry_delta = job.lease_expires - datetime.now(pytz.UTC) | ||
806 | 187 | self.assertTrue(500 <= expiry_delta.seconds, expiry_delta) | ||
807 | 188 | |||
808 | 208 | 189 | ||
809 | 209 | class TestBranchMergeProposalJobSource(TestCaseWithFactory): | 190 | class TestBranchMergeProposalJobSource(TestCaseWithFactory): |
810 | 210 | 191 | ||
811 | 211 | 192 | ||
812 | === modified file 'lib/lp/code/model/tests/test_branchmergeproposals.py' | |||
813 | --- lib/lp/code/model/tests/test_branchmergeproposals.py 2010-04-07 18:05:11 +0000 | |||
814 | +++ lib/lp/code/model/tests/test_branchmergeproposals.py 2010-04-07 18:05:36 +0000 | |||
815 | @@ -49,13 +49,7 @@ | |||
816 | 49 | BranchMergeProposalGetter, is_valid_transition) | 49 | BranchMergeProposalGetter, is_valid_transition) |
817 | 50 | from lp.registry.interfaces.person import IPersonSet | 50 | from lp.registry.interfaces.person import IPersonSet |
818 | 51 | from lp.registry.interfaces.product import IProductSet | 51 | from lp.registry.interfaces.product import IProductSet |
819 | 52 | <<<<<<< TREE | ||
820 | 53 | from lp.services.job.runner import JobRunner | ||
821 | 54 | from lp.testing import ( | ||
822 | 55 | capture_events, login_person, TestCaseWithFactory) | ||
823 | 56 | ======= | ||
824 | 57 | from lp.testing import login_person, TestCaseWithFactory | 52 | from lp.testing import login_person, TestCaseWithFactory |
825 | 58 | >>>>>>> MERGE-SOURCE | ||
826 | 59 | from lp.testing.factory import GPGSigningContext, LaunchpadObjectFactory | 53 | from lp.testing.factory import GPGSigningContext, LaunchpadObjectFactory |
827 | 60 | 54 | ||
828 | 61 | 55 | ||
829 | @@ -176,7 +170,7 @@ | |||
830 | 176 | proposal.superseded_by.rejectBranch(self.target_branch.owner, | 170 | proposal.superseded_by.rejectBranch(self.target_branch.owner, |
831 | 177 | None) | 171 | None) |
832 | 178 | self.assertProposalState(proposal, from_state) | 172 | self.assertProposalState(proposal, from_state) |
834 | 179 | dupe = self.factory.makeBranchMergeProposal( | 173 | self.factory.makeBranchMergeProposal( |
835 | 180 | target_branch=proposal.target_branch, | 174 | target_branch=proposal.target_branch, |
836 | 181 | source_branch=proposal.source_branch) | 175 | source_branch=proposal.source_branch) |
837 | 182 | return proposal | 176 | return proposal |
838 | @@ -972,11 +966,10 @@ | |||
839 | 972 | # participant. | 966 | # participant. |
840 | 973 | wally = self.factory.makePerson(name='wally') | 967 | wally = self.factory.makePerson(name='wally') |
841 | 974 | beaver = self.factory.makePerson(name='beaver') | 968 | beaver = self.factory.makePerson(name='beaver') |
842 | 975 | name12 = getUtility(IPersonSet).getByName('name12') | ||
843 | 976 | 969 | ||
844 | 977 | bmp1 = self._make_merge_proposal('wally', 'gokart', 'turbo', True) | 970 | bmp1 = self._make_merge_proposal('wally', 'gokart', 'turbo', True) |
845 | 978 | bmp1.nominateReviewer(beaver, wally) | 971 | bmp1.nominateReviewer(beaver, wally) |
847 | 979 | bmp2 = self._make_merge_proposal('beaver', 'gokart', 'brakes', True) | 972 | self._make_merge_proposal('beaver', 'gokart', 'brakes', True) |
848 | 980 | 973 | ||
849 | 981 | getter = BranchMergeProposalGetter | 974 | getter = BranchMergeProposalGetter |
850 | 982 | wally_proposals = getter.getProposalsForParticipant( | 975 | wally_proposals = getter.getProposalsForParticipant( |
851 | @@ -1030,8 +1023,8 @@ | |||
852 | 1030 | 1023 | ||
853 | 1031 | def test_wip_for_product_restrictions(self): | 1024 | def test_wip_for_product_restrictions(self): |
854 | 1032 | # Check queries on product limited on status. | 1025 | # Check queries on product limited on status. |
857 | 1033 | in_progress = self._make_merge_proposal('albert', 'november', 'work') | 1026 | self._make_merge_proposal('albert', 'november', 'work') |
858 | 1034 | needs_review = self._make_merge_proposal( | 1027 | self._make_merge_proposal( |
859 | 1035 | 'bob', 'november', 'work', needs_review=True) | 1028 | 'bob', 'november', 'work', needs_review=True) |
860 | 1036 | self.assertEqual( | 1029 | self.assertEqual( |
861 | 1037 | ['~albert/november/work'], | 1030 | ['~albert/november/work'], |
862 | @@ -1386,7 +1379,7 @@ | |||
863 | 1386 | """A comment with a vote creates a vote reference.""" | 1379 | """A comment with a vote creates a vote reference.""" |
864 | 1387 | merge_proposal = self.factory.makeBranchMergeProposal() | 1380 | merge_proposal = self.factory.makeBranchMergeProposal() |
865 | 1388 | reviewer = self.factory.makePerson() | 1381 | reviewer = self.factory.makePerson() |
867 | 1389 | comment = merge_proposal.createComment( | 1382 | merge_proposal.createComment( |
868 | 1390 | reviewer, 'Message subject', 'Message content') | 1383 | reviewer, 'Message subject', 'Message content') |
869 | 1391 | self.assertEqual([], list(merge_proposal.votes)) | 1384 | self.assertEqual([], list(merge_proposal.votes)) |
870 | 1392 | 1385 | ||
871 | @@ -1394,7 +1387,7 @@ | |||
872 | 1394 | """A second vote changes the comment reference only.""" | 1387 | """A second vote changes the comment reference only.""" |
873 | 1395 | merge_proposal = self.factory.makeBranchMergeProposal() | 1388 | merge_proposal = self.factory.makeBranchMergeProposal() |
874 | 1396 | reviewer = self.factory.makePerson() | 1389 | reviewer = self.factory.makePerson() |
876 | 1397 | comment1 = merge_proposal.createComment( | 1390 | merge_proposal.createComment( |
877 | 1398 | reviewer, 'Message subject', 'Message content', | 1391 | reviewer, 'Message subject', 'Message content', |
878 | 1399 | vote=CodeReviewVote.DISAPPROVE) | 1392 | vote=CodeReviewVote.DISAPPROVE) |
879 | 1400 | comment2 = merge_proposal.createComment( | 1393 | comment2 = merge_proposal.createComment( |
880 | @@ -1635,50 +1628,10 @@ | |||
881 | 1635 | removeSecurityProxy(merge_proposal.preview_diff).diff_id) | 1628 | removeSecurityProxy(merge_proposal.preview_diff).diff_id) |
882 | 1636 | 1629 | ||
883 | 1637 | 1630 | ||
884 | 1638 | <<<<<<< TREE | ||
885 | 1639 | class TestUpdatePreviewDiffJob(DiffTestCase): | ||
886 | 1640 | |||
887 | 1641 | layer = LaunchpadZopelessLayer | ||
888 | 1642 | |||
889 | 1643 | def test_implement_interface(self): | ||
890 | 1644 | """UpdatePreviewDiffJob implements IUpdatePreviewDiffJobSource.""" | ||
891 | 1645 | verifyObject(IUpdatePreviewDiffJobSource, UpdatePreviewDiffJob) | ||
892 | 1646 | |||
893 | 1647 | def test_run(self): | ||
894 | 1648 | self.useBzrBranches() | ||
895 | 1649 | bmp = self.createExampleMerge()[0] | ||
896 | 1650 | job = UpdatePreviewDiffJob.create(bmp) | ||
897 | 1651 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) | ||
898 | 1652 | bmp.source_branch.next_mirror_time = None | ||
899 | 1653 | transaction.commit() | ||
900 | 1654 | self.layer.switchDbUser(config.update_preview_diffs.dbuser) | ||
901 | 1655 | JobRunner.fromReady(UpdatePreviewDiffJob).runAll() | ||
902 | 1656 | transaction.commit() | ||
903 | 1657 | self.checkExampleMerge(bmp.preview_diff.text) | ||
904 | 1658 | |||
905 | 1659 | def test_10_minute_lease(self): | ||
906 | 1660 | self.useBzrBranches() | ||
907 | 1661 | bmp = self.createExampleMerge()[0] | ||
908 | 1662 | job = UpdatePreviewDiffJob.create(bmp) | ||
909 | 1663 | job.acquireLease() | ||
910 | 1664 | expiry_delta = job.lease_expires - datetime.now(UTC) | ||
911 | 1665 | self.assertTrue(500 <= expiry_delta.seconds, expiry_delta) | ||
912 | 1666 | |||
913 | 1667 | |||
914 | 1668 | ======= | ||
915 | 1669 | >>>>>>> MERGE-SOURCE | ||
916 | 1670 | class TestNextPreviewDiffJob(TestCaseWithFactory): | 1631 | class TestNextPreviewDiffJob(TestCaseWithFactory): |
917 | 1671 | 1632 | ||
918 | 1672 | layer = DatabaseFunctionalLayer | 1633 | layer = DatabaseFunctionalLayer |
919 | 1673 | 1634 | ||
920 | 1674 | def test_returns_bmp_job(self): | ||
921 | 1675 | """For new proposals, get the MergeProposalCreatedJob.""" | ||
922 | 1676 | bmp = self.factory.makeBranchMergeProposal() | ||
923 | 1677 | job = bmp.next_preview_diff_job | ||
924 | 1678 | self.assertEqual(bmp, job.branch_merge_proposal) | ||
925 | 1679 | self.assertIs( | ||
926 | 1680 | MergeProposalCreatedJob, removeSecurityProxy(job).__class__) | ||
927 | 1681 | |||
928 | 1682 | def test_returns_none_if_job_not_pending(self): | 1635 | def test_returns_none_if_job_not_pending(self): |
929 | 1683 | """Jobs are shown while pending.""" | 1636 | """Jobs are shown while pending.""" |
930 | 1684 | bmp = self.factory.makeBranchMergeProposal() | 1637 | bmp = self.factory.makeBranchMergeProposal() |
931 | @@ -1702,11 +1655,11 @@ | |||
932 | 1702 | Store.of(updatejob.context).flush() | 1655 | Store.of(updatejob.context).flush() |
933 | 1703 | self.assertEqual(updatejob, bmp.next_preview_diff_job) | 1656 | self.assertEqual(updatejob, bmp.next_preview_diff_job) |
934 | 1704 | 1657 | ||
936 | 1705 | def test_returns_first__job(self): | 1658 | def test_returns_first_job(self): |
937 | 1706 | """First-created job is returned.""" | 1659 | """First-created job is returned.""" |
938 | 1707 | bmp = self.makeBranchMergeProposalNoPending() | 1660 | bmp = self.makeBranchMergeProposalNoPending() |
939 | 1708 | updatejob = UpdatePreviewDiffJob.create(bmp) | 1661 | updatejob = UpdatePreviewDiffJob.create(bmp) |
941 | 1709 | updatejob2 = UpdatePreviewDiffJob.create(bmp) | 1662 | UpdatePreviewDiffJob.create(bmp) |
942 | 1710 | self.assertEqual(updatejob, bmp.next_preview_diff_job) | 1663 | self.assertEqual(updatejob, bmp.next_preview_diff_job) |
943 | 1711 | 1664 | ||
944 | 1712 | def test_does_not_return_jobs_for_other_proposals(self): | 1665 | def test_does_not_return_jobs_for_other_proposals(self): |
945 | @@ -1714,7 +1667,7 @@ | |||
946 | 1714 | bmp = self.factory.makeBranchMergeProposal() | 1667 | bmp = self.factory.makeBranchMergeProposal() |
947 | 1715 | bmp.next_preview_diff_job.start() | 1668 | bmp.next_preview_diff_job.start() |
948 | 1716 | bmp.next_preview_diff_job.complete() | 1669 | bmp.next_preview_diff_job.complete() |
950 | 1717 | bmp2 = self.factory.makeBranchMergeProposal() | 1670 | self.factory.makeBranchMergeProposal() |
951 | 1718 | self.assertIs(None, bmp.next_preview_diff_job) | 1671 | self.assertIs(None, bmp.next_preview_diff_job) |
952 | 1719 | 1672 | ||
953 | 1720 | 1673 | ||
954 | 1721 | 1674 | ||
955 | === modified file 'lib/lp/code/model/tests/test_diff.py' | |||
956 | --- lib/lp/code/model/tests/test_diff.py 2010-02-17 19:10:51 +0000 | |||
957 | +++ lib/lp/code/model/tests/test_diff.py 2010-04-07 18:05:36 +0000 | |||
958 | @@ -55,6 +55,10 @@ | |||
959 | 55 | """Create a merge proposal with conflicts and updates.""" | 55 | """Create a merge proposal with conflicts and updates.""" |
960 | 56 | self.useBzrBranches() | 56 | self.useBzrBranches() |
961 | 57 | bmp = self.factory.makeBranchMergeProposal() | 57 | bmp = self.factory.makeBranchMergeProposal() |
962 | 58 | # Make the branches of the merge proposal look good as far as the | ||
963 | 59 | # model is concerned. | ||
964 | 60 | self.factory.makeRevisionsForBranch(bmp.source_branch) | ||
965 | 61 | self.factory.makeRevisionsForBranch(bmp.target_branch) | ||
966 | 58 | bzr_target = self.createBzrBranch(bmp.target_branch) | 62 | bzr_target = self.createBzrBranch(bmp.target_branch) |
967 | 59 | self.commitFile(bmp.target_branch, 'foo', 'a\n') | 63 | self.commitFile(bmp.target_branch, 'foo', 'a\n') |
968 | 60 | self.createBzrBranch(bmp.source_branch, bzr_target) | 64 | self.createBzrBranch(bmp.source_branch, bzr_target) |
969 | 61 | 65 | ||
970 | === modified file 'lib/lp/code/scripts/tests/test_create_merge_proposals.py' | |||
971 | --- lib/lp/code/scripts/tests/test_create_merge_proposals.py 2009-10-17 14:06:03 +0000 | |||
972 | +++ lib/lp/code/scripts/tests/test_create_merge_proposals.py 2010-04-07 18:05:36 +0000 | |||
973 | @@ -40,7 +40,7 @@ | |||
974 | 40 | 'cronscripts/create_merge_proposals.py', []) | 40 | 'cronscripts/create_merge_proposals.py', []) |
975 | 41 | self.assertEqual(0, retcode) | 41 | self.assertEqual(0, retcode) |
976 | 42 | self.assertEqual( | 42 | self.assertEqual( |
978 | 43 | 'INFO creating lockfile\n' | 43 | 'INFO Creating lockfile: /var/lock/launchpad-create_merge_proposals.lock\n' |
979 | 44 | 'INFO Ran 1 CreateMergeProposalJobs.\n', stderr) | 44 | 'INFO Ran 1 CreateMergeProposalJobs.\n', stderr) |
980 | 45 | self.assertEqual('', stdout) | 45 | self.assertEqual('', stdout) |
981 | 46 | self.assertEqual(1, source.landing_targets.count()) | 46 | self.assertEqual(1, source.landing_targets.count()) |
982 | @@ -67,7 +67,7 @@ | |||
983 | 67 | 'cronscripts/create_merge_proposals.py', []) | 67 | 'cronscripts/create_merge_proposals.py', []) |
984 | 68 | self.assertEqual(0, retcode) | 68 | self.assertEqual(0, retcode) |
985 | 69 | self.assertEqual( | 69 | self.assertEqual( |
987 | 70 | 'INFO creating lockfile\n' | 70 | 'INFO Creating lockfile: /var/lock/launchpad-create_merge_proposals.lock\n' |
988 | 71 | 'INFO Ran 1 CreateMergeProposalJobs.\n', stderr) | 71 | 'INFO Ran 1 CreateMergeProposalJobs.\n', stderr) |
989 | 72 | self.assertEqual('', stdout) | 72 | self.assertEqual('', stdout) |
990 | 73 | # The hosted location should be populated, not the mirror. | 73 | # The hosted location should be populated, not the mirror. |
991 | @@ -106,7 +106,7 @@ | |||
992 | 106 | transaction.commit() | 106 | transaction.commit() |
993 | 107 | retcode, stdout, stderr = run_script( | 107 | retcode, stdout, stderr = run_script( |
994 | 108 | 'cronscripts/create_merge_proposals.py', []) | 108 | 'cronscripts/create_merge_proposals.py', []) |
996 | 109 | self.assertIn('INFO creating lockfile\n', stderr) | 109 | self.assertIn('INFO Creating lockfile:', stderr) |
997 | 110 | self.assertIn('INFO Job resulted in OOPS:', stderr) | 110 | self.assertIn('INFO Job resulted in OOPS:', stderr) |
998 | 111 | self.assertIn('INFO Ran 0 CreateMergeProposalJobs.\n', stderr) | 111 | self.assertIn('INFO Ran 0 CreateMergeProposalJobs.\n', stderr) |
999 | 112 | self.assertEqual('', stdout) | 112 | self.assertEqual('', stdout) |
1000 | 113 | 113 | ||
1001 | === renamed file 'lib/lp/code/scripts/tests/test_mp_creationjob.py' => 'lib/lp/code/scripts/tests/test_merge_proposal_jobs.py' | |||
1002 | --- lib/lp/code/scripts/tests/test_mp_creationjob.py 2010-01-06 14:41:45 +0000 | |||
1003 | +++ lib/lp/code/scripts/tests/test_merge_proposal_jobs.py 2010-04-07 18:05:36 +0000 | |||
1004 | @@ -6,64 +6,26 @@ | |||
1005 | 6 | """Test the sendbranchmail script""" | 6 | """Test the sendbranchmail script""" |
1006 | 7 | 7 | ||
1007 | 8 | import unittest | 8 | import unittest |
1008 | 9 | import transaction | ||
1009 | 10 | 9 | ||
1010 | 11 | from canonical.testing import ZopelessAppServerLayer | 10 | from canonical.testing import ZopelessAppServerLayer |
1011 | 12 | from lp.testing import TestCaseWithFactory | 11 | from lp.testing import TestCaseWithFactory |
1012 | 13 | from canonical.launchpad.scripts.tests import run_script | 12 | from canonical.launchpad.scripts.tests import run_script |
1018 | 14 | from lp.code.model.branchmergeproposal import BranchMergeProposal | 13 | |
1019 | 15 | from lp.code.model.branchmergeproposaljob import MergeProposalCreatedJob | 14 | |
1020 | 16 | 15 | class TestMergeProposalJobScript(TestCaseWithFactory): | |
1016 | 17 | |||
1017 | 18 | class TestDiffBMPs(TestCaseWithFactory): | ||
1021 | 19 | 16 | ||
1022 | 20 | layer = ZopelessAppServerLayer | 17 | layer = ZopelessAppServerLayer |
1023 | 21 | 18 | ||
1045 | 22 | def test_mpcreationjobs(self): | 19 | def test_script_runs(self): |
1046 | 23 | """Ensure mpcreationjobs runs and generates diffs.""" | 20 | """Ensure merge-proposal-jobs script runs.""" |
1026 | 24 | self.useTempBzrHome() | ||
1027 | 25 | target, target_tree = self.createMirroredBranchAndTree() | ||
1028 | 26 | target_tree.bzrdir.root_transport.put_bytes('foo', 'foo\n') | ||
1029 | 27 | target_tree.add('foo') | ||
1030 | 28 | target_tree.commit('added foo') | ||
1031 | 29 | target.linkBug(self.factory.makeBug(), target.registrant) | ||
1032 | 30 | source, source_tree = self.createMirroredBranchAndTree() | ||
1033 | 31 | source_tree.pull(target_tree.branch) | ||
1034 | 32 | source_tree.bzrdir.root_transport.put_bytes('foo', 'foo\nbar\n') | ||
1035 | 33 | source_tree.commit('added bar') | ||
1036 | 34 | # Add a fake revisions so the proposal is ready. | ||
1037 | 35 | self.factory.makeRevisionsForBranch(source, count=1) | ||
1038 | 36 | source.linkBug(self.factory.makeBug(), source.registrant) | ||
1039 | 37 | bmp = BranchMergeProposal( | ||
1040 | 38 | source_branch=source, target_branch=target, | ||
1041 | 39 | registrant=source.owner) | ||
1042 | 40 | job = MergeProposalCreatedJob.create(bmp) | ||
1043 | 41 | self.assertIs(None, bmp.preview_diff) | ||
1044 | 42 | transaction.commit() | ||
1047 | 43 | retcode, stdout, stderr = run_script( | 21 | retcode, stdout, stderr = run_script( |
1049 | 44 | 'cronscripts/mpcreationjobs.py', []) | 22 | 'cronscripts/merge-proposal-jobs.py', []) |
1050 | 45 | self.assertEqual(0, retcode) | 23 | self.assertEqual(0, retcode) |
1051 | 46 | self.assertEqual('', stdout) | 24 | self.assertEqual('', stdout) |
1052 | 47 | self.assertEqual( | 25 | self.assertEqual( |
1072 | 48 | 'INFO creating lockfile\n' | 26 | 'INFO Creating lockfile:' |
1073 | 49 | 'INFO Ran 1 MergeProposalCreatedJobs.\n', stderr) | 27 | ' /var/lock/launchpad-merge-proposal-jobs.lock\n' |
1074 | 50 | self.assertIs(None, bmp.review_diff) | 28 | 'INFO Running through Twisted.\n', stderr) |
1056 | 51 | self.assertIsNot(None, bmp.preview_diff) | ||
1057 | 52 | |||
1058 | 53 | def test_mpcreationjobs_records_oops(self): | ||
1059 | 54 | """Ensure mpcreationjobs logs an oops if the job fails.""" | ||
1060 | 55 | bmp = self.factory.makeBranchMergeProposal() | ||
1061 | 56 | self.factory.makeRevisionsForBranch(bmp.source_branch, count=1) | ||
1062 | 57 | job = MergeProposalCreatedJob.create(bmp) | ||
1063 | 58 | transaction.commit() | ||
1064 | 59 | retcode, stdout, stderr = run_script( | ||
1065 | 60 | 'cronscripts/mpcreationjobs.py', []) | ||
1066 | 61 | self.assertEqual(0, retcode) | ||
1067 | 62 | self.assertEqual('', stdout) | ||
1068 | 63 | self.assertIn( | ||
1069 | 64 | 'INFO Ran 0 MergeProposalCreatedJobs.\n', stderr) | ||
1070 | 65 | self.assertIn( | ||
1071 | 66 | 'INFO Job resulted in OOPS:', stderr) | ||
1075 | 67 | 29 | ||
1076 | 68 | def test_suite(): | 30 | def test_suite(): |
1077 | 69 | return unittest.TestLoader().loadTestsFromName(__name__) | 31 | return unittest.TestLoader().loadTestsFromName(__name__) |
1078 | 70 | 32 | ||
1079 | === modified file 'lib/lp/code/scripts/tests/test_reclaim_branch_space.py' | |||
1080 | --- lib/lp/code/scripts/tests/test_reclaim_branch_space.py 2009-09-03 20:53:32 +0000 | |||
1081 | +++ lib/lp/code/scripts/tests/test_reclaim_branch_space.py 2010-04-07 18:05:36 +0000 | |||
1082 | @@ -43,7 +43,7 @@ | |||
1083 | 43 | 'cronscripts/reclaimbranchspace.py', []) | 43 | 'cronscripts/reclaimbranchspace.py', []) |
1084 | 44 | self.assertEqual('', stdout) | 44 | self.assertEqual('', stdout) |
1085 | 45 | self.assertEqual( | 45 | self.assertEqual( |
1087 | 46 | 'INFO creating lockfile\n' | 46 | 'INFO Creating lockfile: /var/lock/launchpad-reclaimbranchspace.lock\n' |
1088 | 47 | 'INFO Reclaimed space for 0 branches.\n', stderr) | 47 | 'INFO Reclaimed space for 0 branches.\n', stderr) |
1089 | 48 | self.assertEqual(0, retcode) | 48 | self.assertEqual(0, retcode) |
1090 | 49 | self.assertTrue( | 49 | self.assertTrue( |
1091 | @@ -61,7 +61,7 @@ | |||
1092 | 61 | 'cronscripts/reclaimbranchspace.py', []) | 61 | 'cronscripts/reclaimbranchspace.py', []) |
1093 | 62 | self.assertEqual('', stdout) | 62 | self.assertEqual('', stdout) |
1094 | 63 | self.assertEqual( | 63 | self.assertEqual( |
1096 | 64 | 'INFO creating lockfile\n' | 64 | 'INFO Creating lockfile: /var/lock/launchpad-reclaimbranchspace.lock\n' |
1097 | 65 | 'INFO Reclaimed space for 1 branches.\n', stderr) | 65 | 'INFO Reclaimed space for 1 branches.\n', stderr) |
1098 | 66 | self.assertEqual(0, retcode) | 66 | self.assertEqual(0, retcode) |
1099 | 67 | self.assertFalse( | 67 | self.assertFalse( |
1100 | @@ -91,8 +91,7 @@ | |||
1101 | 91 | # The script will now remove the branch from disk. | 91 | # The script will now remove the branch from disk. |
1102 | 92 | retcode, stdout, stderr = run_script( | 92 | retcode, stdout, stderr = run_script( |
1103 | 93 | 'cronscripts/reclaimbranchspace.py', []) | 93 | 'cronscripts/reclaimbranchspace.py', []) |
1106 | 94 | self.assertEqual('', stdout) | 94 | self.assertIn('INFO Creating lockfile: ', stderr) |
1105 | 95 | self.assertIn('INFO creating lockfile\n', stderr) | ||
1107 | 96 | self.assertIn('INFO Job resulted in OOPS:', stderr) | 95 | self.assertIn('INFO Job resulted in OOPS:', stderr) |
1108 | 97 | self.assertIn('INFO Reclaimed space for 0 branches.\n', stderr) | 96 | self.assertIn('INFO Reclaimed space for 0 branches.\n', stderr) |
1109 | 98 | 97 | ||
1110 | 99 | 98 | ||
1111 | === modified file 'lib/lp/code/scripts/tests/test_scan_branches.py' | |||
1112 | --- lib/lp/code/scripts/tests/test_scan_branches.py 2010-01-29 19:15:05 +0000 | |||
1113 | +++ lib/lp/code/scripts/tests/test_scan_branches.py 2010-04-07 18:05:36 +0000 | |||
1114 | @@ -31,7 +31,7 @@ | |||
1115 | 31 | target_tree.commit('First commit', rev_id='rev1') | 31 | target_tree.commit('First commit', rev_id='rev1') |
1116 | 32 | target_tree.commit('Second commit', rev_id='rev2') | 32 | target_tree.commit('Second commit', rev_id='rev2') |
1117 | 33 | target_tree.commit('Third commit', rev_id='rev3') | 33 | target_tree.commit('Third commit', rev_id='rev3') |
1119 | 34 | job = BranchScanJob.create(db_branch) | 34 | BranchScanJob.create(db_branch) |
1120 | 35 | transaction.commit() | 35 | transaction.commit() |
1121 | 36 | 36 | ||
1122 | 37 | def run_script_and_assert_success(self): | 37 | def run_script_and_assert_success(self): |
1123 | @@ -41,7 +41,7 @@ | |||
1124 | 41 | expect_returncode=0) | 41 | expect_returncode=0) |
1125 | 42 | self.assertEqual('', stdout) | 42 | self.assertEqual('', stdout) |
1126 | 43 | self.assertIn( | 43 | self.assertIn( |
1128 | 44 | 'INFO Ran 1 IBranchScanJobSource jobs.\n', stderr) | 44 | 'INFO Ran 1 BranchScanJob jobs.\n', stderr) |
1129 | 45 | 45 | ||
1130 | 46 | def test_scan_branch(self): | 46 | def test_scan_branch(self): |
1131 | 47 | """Test that scan branches adds revisions to the database.""" | 47 | """Test that scan branches adds revisions to the database.""" |
1132 | 48 | 48 | ||
1133 | === modified file 'lib/lp/code/scripts/tests/test_sendbranchmail.py' | |||
1134 | --- lib/lp/code/scripts/tests/test_sendbranchmail.py 2009-10-17 14:06:03 +0000 | |||
1135 | +++ lib/lp/code/scripts/tests/test_sendbranchmail.py 2010-04-07 18:05:36 +0000 | |||
1136 | @@ -38,13 +38,14 @@ | |||
1137 | 38 | """Ensure sendbranchmail runs and sends email.""" | 38 | """Ensure sendbranchmail runs and sends email.""" |
1138 | 39 | self.useTempBzrHome() | 39 | self.useTempBzrHome() |
1139 | 40 | branch, tree = self.createBranch() | 40 | branch, tree = self.createBranch() |
1141 | 41 | job_1 = RevisionMailJob.create( | 41 | RevisionMailJob.create( |
1142 | 42 | branch, 1, 'from@example.org', 'body', True, 'foo') | 42 | branch, 1, 'from@example.org', 'body', True, 'foo') |
1143 | 43 | transaction.commit() | 43 | transaction.commit() |
1144 | 44 | retcode, stdout, stderr = run_script( | 44 | retcode, stdout, stderr = run_script( |
1145 | 45 | 'cronscripts/sendbranchmail.py', []) | 45 | 'cronscripts/sendbranchmail.py', []) |
1148 | 46 | self.assertEqual('INFO creating lockfile\n' | 46 | self.assertEqual( |
1149 | 47 | 'INFO Ran 1 RevisionMailJobs.\n', stderr) | 47 | 'INFO Creating lockfile: /var/lock/launchpad-sendbranchmail.lock\n' |
1150 | 48 | 'INFO Ran 1 RevisionMailJobs.\n', stderr) | ||
1151 | 48 | self.assertEqual('', stdout) | 49 | self.assertEqual('', stdout) |
1152 | 49 | self.assertEqual(0, retcode) | 50 | self.assertEqual(0, retcode) |
1153 | 50 | 51 | ||
1154 | @@ -52,12 +53,14 @@ | |||
1155 | 52 | """Ensure sendbranchmail runs and sends email.""" | 53 | """Ensure sendbranchmail runs and sends email.""" |
1156 | 53 | self.useTempBzrHome() | 54 | self.useTempBzrHome() |
1157 | 54 | branch = self.factory.makeBranch() | 55 | branch = self.factory.makeBranch() |
1159 | 55 | job_1 = RevisionMailJob.create( | 56 | RevisionMailJob.create( |
1160 | 56 | branch, 1, 'from@example.org', 'body', True, 'foo') | 57 | branch, 1, 'from@example.org', 'body', True, 'foo') |
1161 | 57 | transaction.commit() | 58 | transaction.commit() |
1162 | 58 | retcode, stdout, stderr = run_script( | 59 | retcode, stdout, stderr = run_script( |
1163 | 59 | 'cronscripts/sendbranchmail.py', []) | 60 | 'cronscripts/sendbranchmail.py', []) |
1165 | 60 | self.assertIn('INFO creating lockfile\n', stderr) | 61 | self.assertIn( |
1166 | 62 | 'INFO Creating lockfile: /var/lock/launchpad-sendbranchmail.lock\n', | ||
1167 | 63 | stderr) | ||
1168 | 61 | self.assertIn('INFO Job resulted in OOPS:', stderr) | 64 | self.assertIn('INFO Job resulted in OOPS:', stderr) |
1169 | 62 | self.assertIn('INFO Ran 0 RevisionMailJobs.\n', stderr) | 65 | self.assertIn('INFO Ran 0 RevisionMailJobs.\n', stderr) |
1170 | 63 | self.assertEqual('', stdout) | 66 | self.assertEqual('', stdout) |
1171 | @@ -69,13 +72,15 @@ | |||
1172 | 69 | branch, tree = self.createBranch() | 72 | branch, tree = self.createBranch() |
1173 | 70 | tree.bzrdir.root_transport.put_bytes('foo', 'baz') | 73 | tree.bzrdir.root_transport.put_bytes('foo', 'baz') |
1174 | 71 | tree.commit('Added foo.', rev_id='rev2') | 74 | tree.commit('Added foo.', rev_id='rev2') |
1176 | 72 | job_1 = RevisionsAddedJob.create( | 75 | RevisionsAddedJob.create( |
1177 | 73 | branch, 'rev1', 'rev2', 'from@example.org') | 76 | branch, 'rev1', 'rev2', 'from@example.org') |
1178 | 74 | transaction.commit() | 77 | transaction.commit() |
1179 | 75 | retcode, stdout, stderr = run_script( | 78 | retcode, stdout, stderr = run_script( |
1180 | 76 | 'cronscripts/sendbranchmail.py', []) | 79 | 'cronscripts/sendbranchmail.py', []) |
1183 | 77 | self.assertEqual('INFO creating lockfile\n' | 80 | self.assertEqual( |
1184 | 78 | 'INFO Ran 1 RevisionMailJobs.\n', stderr) | 81 | 'INFO Creating lockfile: /var/lock/launchpad-sendbranchmail.lock\n' |
1185 | 82 | 'INFO Ran 1 RevisionMailJobs.\n', | ||
1186 | 83 | stderr) | ||
1187 | 79 | self.assertEqual('', stdout) | 84 | self.assertEqual('', stdout) |
1188 | 80 | self.assertEqual(0, retcode) | 85 | self.assertEqual(0, retcode) |
1189 | 81 | 86 | ||
1190 | 82 | 87 | ||
1191 | === removed file 'lib/lp/code/scripts/tests/test_update_preview_diffs.py' | |||
1192 | --- lib/lp/code/scripts/tests/test_update_preview_diffs.py 2010-01-05 20:37:10 +0000 | |||
1193 | +++ lib/lp/code/scripts/tests/test_update_preview_diffs.py 1970-01-01 00:00:00 +0000 | |||
1194 | @@ -1,93 +0,0 @@ | |||
1195 | 1 | #! /usr/bin/python2.5 | ||
1196 | 2 | # | ||
1197 | 3 | # Copyright 2009 Canonical Ltd. This software is licensed under the | ||
1198 | 4 | # GNU Affero General Public License version 3 (see the file LICENSE). | ||
1199 | 5 | |||
1200 | 6 | """Test the update_preview_diffs script.""" | ||
1201 | 7 | |||
1202 | 8 | |||
1203 | 9 | import transaction | ||
1204 | 10 | |||
1205 | 11 | from canonical.testing import ZopelessAppServerLayer | ||
1206 | 12 | from lp.testing import TestCaseWithFactory | ||
1207 | 13 | from canonical.launchpad.scripts.tests import run_script | ||
1208 | 14 | from canonical.launchpad.webapp import errorlog | ||
1209 | 15 | from lp.code.model.branchmergeproposal import BranchMergeProposal | ||
1210 | 16 | from lp.code.model.branchmergeproposaljob import UpdatePreviewDiffJob | ||
1211 | 17 | |||
1212 | 18 | |||
1213 | 19 | class TestUpdatePreviewDiffs(TestCaseWithFactory): | ||
1214 | 20 | |||
1215 | 21 | layer = ZopelessAppServerLayer | ||
1216 | 22 | |||
1217 | 23 | def create_preview_diff_job(self): | ||
1218 | 24 | self.useTempBzrHome() | ||
1219 | 25 | target, target_tree = self.createMirroredBranchAndTree() | ||
1220 | 26 | target_tree.bzrdir.root_transport.put_bytes('foo', 'foo\n') | ||
1221 | 27 | target_tree.add('foo') | ||
1222 | 28 | target_tree.commit('added foo') | ||
1223 | 29 | source, source_tree = self.createMirroredBranchAndTree() | ||
1224 | 30 | source_tree.pull(target_tree.branch) | ||
1225 | 31 | source_tree.bzrdir.root_transport.put_bytes('foo', 'foo\nbar\n') | ||
1226 | 32 | source_tree.commit('added bar') | ||
1227 | 33 | # Add a fake revisions so the proposal is ready. | ||
1228 | 34 | self.factory.makeRevisionsForBranch(source, count=1) | ||
1229 | 35 | bmp = BranchMergeProposal( | ||
1230 | 36 | source_branch=source, target_branch=target, | ||
1231 | 37 | registrant=source.owner) | ||
1232 | 38 | job = UpdatePreviewDiffJob.create(bmp) | ||
1233 | 39 | self.assertIs(None, bmp.preview_diff) | ||
1234 | 40 | transaction.commit() | ||
1235 | 41 | return job, bmp, source_tree | ||
1236 | 42 | |||
1237 | 43 | def test_update_preview_diffs(self): | ||
1238 | 44 | """Ensure update_preview_diffs runs and generates diffs.""" | ||
1239 | 45 | job, bmp, source_tree = self.create_preview_diff_job() | ||
1240 | 46 | retcode, stdout, stderr = run_script( | ||
1241 | 47 | 'cronscripts/update_preview_diffs.py', []) | ||
1242 | 48 | self.assertEqual(0, retcode) | ||
1243 | 49 | self.assertEqual('', stdout) | ||
1244 | 50 | self.assertEqual( | ||
1245 | 51 | 'INFO creating lockfile\n' | ||
1246 | 52 | 'INFO Running synchronously.\n' | ||
1247 | 53 | 'INFO Ran 1 IUpdatePreviewDiffJobSource jobs.\n' | ||
1248 | 54 | 'INFO 0 IUpdatePreviewDiffJobSource jobs did not complete.\n', | ||
1249 | 55 | stderr) | ||
1250 | 56 | self.assertIsNot(None, bmp.preview_diff) | ||
1251 | 57 | |||
1252 | 58 | def test_update_preview_diffs_twisted(self): | ||
1253 | 59 | """Ensure update_preview_diffs runs and generates diffs.""" | ||
1254 | 60 | job, bmp, source_tree = self.create_preview_diff_job() | ||
1255 | 61 | retcode, stdout, stderr = run_script( | ||
1256 | 62 | 'cronscripts/update_preview_diffs.py', ['--twisted']) | ||
1257 | 63 | self.assertEqual(0, retcode) | ||
1258 | 64 | self.assertEqual('', stdout) | ||
1259 | 65 | self.assertEqual( | ||
1260 | 66 | 'INFO creating lockfile\n' | ||
1261 | 67 | 'INFO Running through Twisted.\n' | ||
1262 | 68 | 'INFO Ran 1 IUpdatePreviewDiffJobSource jobs.\n' | ||
1263 | 69 | 'INFO 0 IUpdatePreviewDiffJobSource jobs did not complete.\n', | ||
1264 | 70 | stderr) | ||
1265 | 71 | self.assertIsNot(None, bmp.preview_diff) | ||
1266 | 72 | |||
1267 | 73 | def test_update_preview_diffs_oops(self): | ||
1268 | 74 | """Ensure update_preview_diffs runs and generates diffs.""" | ||
1269 | 75 | job, bmp, source_tree = self.create_preview_diff_job() | ||
1270 | 76 | source_tree.bzrdir.root_transport.delete_tree('.bzr') | ||
1271 | 77 | error_utility = errorlog.ErrorReportingUtility() | ||
1272 | 78 | error_utility.configure('update_preview_diffs') | ||
1273 | 79 | old_report = error_utility.getLastOopsReport() | ||
1274 | 80 | if old_report is not None: | ||
1275 | 81 | old_id = old_report.id | ||
1276 | 82 | else: | ||
1277 | 83 | old_id = None | ||
1278 | 84 | retcode, stdout, stderr = run_script( | ||
1279 | 85 | 'cronscripts/update_preview_diffs.py', ['--twisted']) | ||
1280 | 86 | self.assertEqual(0, retcode) | ||
1281 | 87 | self.assertIn( | ||
1282 | 88 | 'INFO 1 IUpdatePreviewDiffJobSource jobs did not complete.\n', | ||
1283 | 89 | stderr) | ||
1284 | 90 | self.assertIn('INFO Job resulted in OOPS:', stderr) | ||
1285 | 91 | new_id = error_utility.getLastOopsReport().id | ||
1286 | 92 | self.assertNotEqual(old_id, new_id) | ||
1287 | 93 | |||
1288 | 94 | 0 | ||
1289 | === modified file 'lib/lp/code/scripts/tests/test_upgrade_branches.py' | |||
1290 | --- lib/lp/code/scripts/tests/test_upgrade_branches.py 2010-01-22 06:03:19 +0000 | |||
1291 | +++ lib/lp/code/scripts/tests/test_upgrade_branches.py 2010-04-07 18:05:36 +0000 | |||
1292 | @@ -32,7 +32,7 @@ | |||
1293 | 32 | target_tree.branch.repository._format.get_format_string(), | 32 | target_tree.branch.repository._format.get_format_string(), |
1294 | 33 | 'Bazaar-NG Knit Repository Format 1') | 33 | 'Bazaar-NG Knit Repository Format 1') |
1295 | 34 | 34 | ||
1297 | 35 | job = BranchUpgradeJob.create(target) | 35 | BranchUpgradeJob.create(target) |
1298 | 36 | transaction.commit() | 36 | transaction.commit() |
1299 | 37 | 37 | ||
1300 | 38 | retcode, stdout, stderr = run_script( | 38 | retcode, stdout, stderr = run_script( |
1301 | @@ -40,7 +40,7 @@ | |||
1302 | 40 | expect_returncode=0) | 40 | expect_returncode=0) |
1303 | 41 | self.assertEqual('', stdout) | 41 | self.assertEqual('', stdout) |
1304 | 42 | self.assertIn( | 42 | self.assertIn( |
1306 | 43 | 'INFO Ran 1 IBranchUpgradeJobSource jobs.\n', stderr) | 43 | 'INFO Ran 1 BranchUpgradeJob jobs.\n', stderr) |
1307 | 44 | 44 | ||
1308 | 45 | target_branch = BzrBranch.open(target_tree.branch.base) | 45 | target_branch = BzrBranch.open(target_tree.branch.base) |
1309 | 46 | self.assertEqual( | 46 | self.assertEqual( |
1310 | @@ -60,7 +60,7 @@ | |||
1311 | 60 | target_tree.branch.repository._format.get_format_string(), | 60 | target_tree.branch.repository._format.get_format_string(), |
1312 | 61 | 'Bazaar-NG Knit Repository Format 1') | 61 | 'Bazaar-NG Knit Repository Format 1') |
1313 | 62 | 62 | ||
1315 | 63 | job = BranchUpgradeJob.create(target) | 63 | BranchUpgradeJob.create(target) |
1316 | 64 | transaction.commit() | 64 | transaction.commit() |
1317 | 65 | 65 | ||
1318 | 66 | retcode, stdout, stderr = run_script( | 66 | retcode, stdout, stderr = run_script( |
1319 | @@ -68,7 +68,7 @@ | |||
1320 | 68 | expect_returncode=0) | 68 | expect_returncode=0) |
1321 | 69 | self.assertEqual('', stdout) | 69 | self.assertEqual('', stdout) |
1322 | 70 | self.assertIn( | 70 | self.assertIn( |
1324 | 71 | 'INFO Ran 1 IBranchUpgradeJobSource jobs.\n', stderr) | 71 | 'INFO Ran 1 BranchUpgradeJob jobs.\n', stderr) |
1325 | 72 | 72 | ||
1326 | 73 | target_branch = BzrBranch.open(target_tree.branch.base) | 73 | target_branch = BzrBranch.open(target_tree.branch.base) |
1327 | 74 | self.assertEqual( | 74 | self.assertEqual( |
1328 | 75 | 75 | ||
1329 | === modified file 'lib/lp/code/tests/helpers.py' | |||
1330 | --- lib/lp/code/tests/helpers.py 2009-12-13 11:55:40 +0000 | |||
1331 | +++ lib/lp/code/tests/helpers.py 2010-04-07 18:05:36 +0000 | |||
1332 | @@ -19,6 +19,8 @@ | |||
1333 | 19 | from zope.security.proxy import removeSecurityProxy | 19 | from zope.security.proxy import removeSecurityProxy |
1334 | 20 | from zope.security.proxy import isinstance as zisinstance | 20 | from zope.security.proxy import isinstance as zisinstance |
1335 | 21 | 21 | ||
1336 | 22 | from lp.code.interfaces.branchmergeproposal import ( | ||
1337 | 23 | IBranchMergeProposalJobSource) | ||
1338 | 22 | from lp.code.interfaces.seriessourcepackagebranch import ( | 24 | from lp.code.interfaces.seriessourcepackagebranch import ( |
1339 | 23 | IMakeOfficialBranchLinks) | 25 | IMakeOfficialBranchLinks) |
1340 | 24 | from lp.registry.interfaces.series import SeriesStatus | 26 | from lp.registry.interfaces.series import SeriesStatus |
1341 | @@ -26,6 +28,20 @@ | |||
1342 | 26 | from lp.testing import time_counter | 28 | from lp.testing import time_counter |
1343 | 27 | 29 | ||
1344 | 28 | 30 | ||
1345 | 31 | def mark_all_merge_proposal_jobs_done(): | ||
1346 | 32 | """Sometimes in tests we want to clear out all pending jobs. | ||
1347 | 33 | |||
1348 | 34 | This function iterates through all the pending jobs and marks the done. | ||
1349 | 35 | """ | ||
1350 | 36 | while True: | ||
1351 | 37 | jobs = list(getUtility(IBranchMergeProposalJobSource).iterReady()) | ||
1352 | 38 | if len(jobs) == 0: | ||
1353 | 39 | break | ||
1354 | 40 | for job in jobs: | ||
1355 | 41 | job.start() | ||
1356 | 42 | job.complete() | ||
1357 | 43 | |||
1358 | 44 | |||
1359 | 29 | def add_revision_to_branch(factory, branch, revision_date, date_created=None, | 45 | def add_revision_to_branch(factory, branch, revision_date, date_created=None, |
1360 | 30 | mainline=True, commit_msg=None): | 46 | mainline=True, commit_msg=None): |
1361 | 31 | """Add a new revision to the branch with the specified revision date. | 47 | """Add a new revision to the branch with the specified revision date. |
1362 | 32 | 48 | ||
1363 | === modified file 'lib/lp/codehosting/scanner/tests/test_bzrsync.py' | |||
1364 | --- lib/lp/codehosting/scanner/tests/test_bzrsync.py 2010-03-09 19:52:02 +0000 | |||
1365 | +++ lib/lp/codehosting/scanner/tests/test_bzrsync.py 2010-04-07 18:05:36 +0000 | |||
1366 | @@ -655,17 +655,18 @@ | |||
1367 | 655 | @run_as_db_user(config.launchpad.dbuser) | 655 | @run_as_db_user(config.launchpad.dbuser) |
1368 | 656 | def test_create_on_new_revision(self): | 656 | def test_create_on_new_revision(self): |
1369 | 657 | """When branch tip changes, a job is created.""" | 657 | """When branch tip changes, a job is created.""" |
1370 | 658 | revision_id = self.commitRevision() | ||
1371 | 659 | bmp = self.factory.makeBranchMergeProposal( | 658 | bmp = self.factory.makeBranchMergeProposal( |
1372 | 660 | source_branch=self.db_branch) | 659 | source_branch=self.db_branch) |
1373 | 661 | removeSecurityProxy(bmp).target_branch.last_scanned_id = 'rev' | 660 | removeSecurityProxy(bmp).target_branch.last_scanned_id = 'rev' |
1374 | 661 | # The creation of a merge proposal has created an update preview diff | ||
1375 | 662 | # job, so we'll mark that one as done. | ||
1376 | 663 | bmp.next_preview_diff_job.start() | ||
1377 | 664 | bmp.next_preview_diff_job.complete() | ||
1378 | 665 | self.assertIs(None, bmp.next_preview_diff_job) | ||
1379 | 662 | transaction.commit() | 666 | transaction.commit() |
1380 | 663 | LaunchpadZopelessLayer.switchDbUser(config.branchscanner.dbuser) | 667 | LaunchpadZopelessLayer.switchDbUser(config.branchscanner.dbuser) |
1381 | 664 | self.makeBzrSync(self.db_branch).syncBranchAndClose() | 668 | self.makeBzrSync(self.db_branch).syncBranchAndClose() |
1386 | 665 | jobs = list(getUtility(IUpdatePreviewDiffJobSource).iterReady()) | 669 | self.assertIsNot(None, bmp.next_preview_diff_job) |
1383 | 666 | self.assertEqual(1, len(jobs)) | ||
1384 | 667 | self.assertEqual( | ||
1385 | 668 | bmp, removeSecurityProxy(jobs[0]).branch_merge_proposal) | ||
1387 | 669 | 670 | ||
1388 | 670 | 671 | ||
1389 | 671 | class TestRevisionProperty(BzrSyncTestCase): | 672 | class TestRevisionProperty(BzrSyncTestCase): |
1390 | 672 | 673 | ||
1391 | === modified file 'lib/lp/codehosting/scanner/tests/test_mergedetection.py' | |||
1392 | --- lib/lp/codehosting/scanner/tests/test_mergedetection.py 2010-03-02 18:56:25 +0000 | |||
1393 | +++ lib/lp/codehosting/scanner/tests/test_mergedetection.py 2010-04-07 18:05:36 +0000 | |||
1394 | @@ -14,16 +14,21 @@ | |||
1395 | 14 | from zope.component import getUtility | 14 | from zope.component import getUtility |
1396 | 15 | from zope.event import notify | 15 | from zope.event import notify |
1397 | 16 | 16 | ||
1398 | 17 | from canonical.config import config | ||
1399 | 18 | from canonical.launchpad.interfaces import IStore | ||
1400 | 19 | from canonical.testing import LaunchpadZopelessLayer | ||
1401 | 20 | |||
1402 | 17 | from lp.codehosting.scanner import events | 21 | from lp.codehosting.scanner import events |
1403 | 18 | from lp.codehosting.scanner import mergedetection | 22 | from lp.codehosting.scanner import mergedetection |
1404 | 19 | from lp.codehosting.scanner.tests.test_bzrsync import ( | 23 | from lp.codehosting.scanner.tests.test_bzrsync import ( |
1405 | 20 | BzrSyncTestCase, run_as_db_user) | 24 | BzrSyncTestCase, run_as_db_user) |
1406 | 21 | from canonical.config import config | ||
1407 | 22 | from lp.code.enums import BranchLifecycleStatus, BranchMergeProposalStatus | 25 | from lp.code.enums import BranchLifecycleStatus, BranchMergeProposalStatus |
1408 | 26 | from lp.code.model.branchmergeproposaljob import ( | ||
1409 | 27 | BranchMergeProposalJob, BranchMergeProposalJobFactory, | ||
1410 | 28 | BranchMergeProposalJobType) | ||
1411 | 23 | from lp.code.interfaces.branchlookup import IBranchLookup | 29 | from lp.code.interfaces.branchlookup import IBranchLookup |
1412 | 24 | from lp.testing import TestCaseWithFactory | 30 | from lp.testing import TestCaseWithFactory |
1413 | 25 | from lp.testing.mail_helpers import pop_notifications | 31 | from lp.testing.mail_helpers import pop_notifications |
1414 | 26 | from canonical.testing import LaunchpadZopelessLayer | ||
1415 | 27 | 32 | ||
1416 | 28 | 33 | ||
1417 | 29 | class TestAutoMergeDetectionForMergeProposals(BzrSyncTestCase): | 34 | class TestAutoMergeDetectionForMergeProposals(BzrSyncTestCase): |
1418 | @@ -35,7 +40,7 @@ | |||
1419 | 35 | @run_as_db_user(config.launchpad.dbuser) | 40 | @run_as_db_user(config.launchpad.dbuser) |
1420 | 36 | def createProposal(self, source, target): | 41 | def createProposal(self, source, target): |
1421 | 37 | # The scanner doesn't have insert rights, so do it here. | 42 | # The scanner doesn't have insert rights, so do it here. |
1423 | 38 | proposal = source.addLandingTarget(source.owner, target) | 43 | source.addLandingTarget(source.owner, target) |
1424 | 39 | transaction.commit() | 44 | transaction.commit() |
1425 | 40 | 45 | ||
1426 | 41 | def _createBranchesAndProposal(self): | 46 | def _createBranchesAndProposal(self): |
1427 | @@ -210,7 +215,7 @@ | |||
1428 | 210 | # Other branches for the product are checked, but if the tip revision | 215 | # Other branches for the product are checked, but if the tip revision |
1429 | 211 | # of the branch is not yet been set no merge event is emitted for that | 216 | # of the branch is not yet been set no merge event is emitted for that |
1430 | 212 | # branch. | 217 | # branch. |
1432 | 213 | source = self.factory.makeProductBranch(product=self.product) | 218 | self.factory.makeProductBranch(product=self.product) |
1433 | 214 | self.autoMergeBranches(self.db_branch, ['revid']) | 219 | self.autoMergeBranches(self.db_branch, ['revid']) |
1434 | 215 | self.assertEqual([], self.merges) | 220 | self.assertEqual([], self.merges) |
1435 | 216 | 221 | ||
1436 | @@ -257,6 +262,13 @@ | |||
1437 | 257 | self.assertEqual( | 262 | self.assertEqual( |
1438 | 258 | BranchLifecycleStatus.MERGED, | 263 | BranchLifecycleStatus.MERGED, |
1439 | 259 | proposal.source_branch.lifecycle_status) | 264 | proposal.source_branch.lifecycle_status) |
1440 | 265 | job = IStore(proposal).find( | ||
1441 | 266 | BranchMergeProposalJob, | ||
1442 | 267 | BranchMergeProposalJob.branch_merge_proposal == proposal, | ||
1443 | 268 | BranchMergeProposalJob.job_type == | ||
1444 | 269 | BranchMergeProposalJobType.MERGE_PROPOSAL_UPDATED).one() | ||
1445 | 270 | derived_job = BranchMergeProposalJobFactory.create(job) | ||
1446 | 271 | derived_job.run() | ||
1447 | 260 | notifications = pop_notifications() | 272 | notifications = pop_notifications() |
1448 | 261 | self.assertIn('Work in progress => Merged', | 273 | self.assertIn('Work in progress => Merged', |
1449 | 262 | notifications[0].get_payload(decode=True)) | 274 | notifications[0].get_payload(decode=True)) |
1450 | 263 | 275 | ||
1451 | === modified file 'lib/lp/hardwaredb/doc/hwdb-submission.txt' | |||
1452 | --- lib/lp/hardwaredb/doc/hwdb-submission.txt 2010-02-02 17:12:29 +0000 | |||
1453 | +++ lib/lp/hardwaredb/doc/hwdb-submission.txt 2010-04-07 18:05:36 +0000 | |||
1454 | @@ -270,7 +270,7 @@ | |||
1455 | 270 | >>> returnvalue | 270 | >>> returnvalue |
1456 | 271 | 0 | 271 | 0 |
1457 | 272 | >>> print err | 272 | >>> print err |
1459 | 273 | INFO creating lockfile | 273 | INFO Creating lockfile: /var/lock/launchpad-hwdbsubmissions.lock |
1460 | 274 | ERROR Parsing submission test_submission_id_1: syntax error: | 274 | ERROR Parsing submission test_submission_id_1: syntax error: |
1461 | 275 | line 1, column 0 | 275 | line 1, column 0 |
1462 | 276 | INFO Processed 0 valid and 1 invalid HWDB submissions | 276 | INFO Processed 0 valid and 1 invalid HWDB submissions |
1463 | @@ -306,7 +306,7 @@ | |||
1464 | 306 | >>> returnvalue | 306 | >>> returnvalue |
1465 | 307 | 0 | 307 | 0 |
1466 | 308 | >>> print err | 308 | >>> print err |
1468 | 309 | INFO creating lockfile | 309 | INFO Creating lockfile: /var/lock/launchpad-hwdbsubmissions.lock |
1469 | 310 | ERROR Parsing submission unique-id-1: syntax error: line 1, column 0 | 310 | ERROR Parsing submission unique-id-1: syntax error: line 1, column 0 |
1470 | 311 | INFO Processed 1 valid and 1 invalid HWDB submissions | 311 | INFO Processed 1 valid and 1 invalid HWDB submissions |
1471 | 312 | >>> print out | 312 | >>> print out |
1472 | @@ -366,7 +366,7 @@ | |||
1473 | 366 | >>> returnvalue | 366 | >>> returnvalue |
1474 | 367 | 0 | 367 | 0 |
1475 | 368 | >>> print err | 368 | >>> print err |
1477 | 369 | INFO creating lockfile | 369 | INFO Creating lockfile: /var/lock/launchpad-hwdbsubmissions.lock |
1478 | 370 | INFO Processed 60 valid and 0 invalid HWDB submissions | 370 | INFO Processed 60 valid and 0 invalid HWDB submissions |
1479 | 371 | >>> print out | 371 | >>> print out |
1480 | 372 | <BLANKLINE> | 372 | <BLANKLINE> |
1481 | @@ -403,7 +403,7 @@ | |||
1482 | 403 | >>> returnvalue | 403 | >>> returnvalue |
1483 | 404 | 0 | 404 | 0 |
1484 | 405 | >>> print err | 405 | >>> print err |
1486 | 406 | INFO creating lockfile | 406 | INFO Creating lockfile: /var/lock/launchpad-hwdbsubmissions.lock |
1487 | 407 | INFO Processed 100 valid and 0 invalid HWDB submissions | 407 | INFO Processed 100 valid and 0 invalid HWDB submissions |
1488 | 408 | >>> print out | 408 | >>> print out |
1489 | 409 | <BLANKLINE> | 409 | <BLANKLINE> |
1490 | 410 | 410 | ||
1491 | === modified file 'lib/lp/registry/doc/distribution-mirror.txt' | |||
1492 | --- lib/lp/registry/doc/distribution-mirror.txt 2010-03-31 11:57:54 +0000 | |||
1493 | +++ lib/lp/registry/doc/distribution-mirror.txt 2010-04-07 18:05:36 +0000 | |||
1494 | @@ -585,7 +585,7 @@ | |||
1495 | 585 | >>> print stdout | 585 | >>> print stdout |
1496 | 586 | <BLANKLINE> | 586 | <BLANKLINE> |
1497 | 587 | >>> print stderr | 587 | >>> print stderr |
1499 | 588 | INFO creating lockfile | 588 | INFO Creating lockfile: /var/lock/launchpad-distributionmirror-prober.lock |
1500 | 589 | INFO Probing Archive Mirrors | 589 | INFO Probing Archive Mirrors |
1501 | 590 | INFO Probed 4 mirrors. | 590 | INFO Probed 4 mirrors. |
1502 | 591 | INFO Disabling 1 mirror(s): | 591 | INFO Disabling 1 mirror(s): |
1503 | @@ -599,7 +599,7 @@ | |||
1504 | 599 | >>> print stdout | 599 | >>> print stdout |
1505 | 600 | <BLANKLINE> | 600 | <BLANKLINE> |
1506 | 601 | >>> print stderr | 601 | >>> print stderr |
1508 | 602 | INFO creating lockfile | 602 | INFO Creating lockfile: /var/lock/launchpad-distributionmirror-prober.lock |
1509 | 603 | INFO Probing CD Image Mirrors | 603 | INFO Probing CD Image Mirrors |
1510 | 604 | INFO Probed 4 mirrors. | 604 | INFO Probed 4 mirrors. |
1511 | 605 | INFO Disabling 1 mirror(s): | 605 | INFO Disabling 1 mirror(s): |
1512 | @@ -615,7 +615,7 @@ | |||
1513 | 615 | >>> print stdout | 615 | >>> print stdout |
1514 | 616 | <BLANKLINE> | 616 | <BLANKLINE> |
1515 | 617 | >>> print stderr | 617 | >>> print stderr |
1517 | 618 | INFO creating lockfile | 618 | INFO Creating lockfile: /var/lock/launchpad-distributionmirror-prober.lock |
1518 | 619 | INFO Probing CD Image Mirrors | 619 | INFO Probing CD Image Mirrors |
1519 | 620 | INFO No mirrors to probe. | 620 | INFO No mirrors to probe. |
1520 | 621 | INFO Done. | 621 | INFO Done. |
1521 | @@ -628,7 +628,7 @@ | |||
1522 | 628 | >>> print stdout | 628 | >>> print stdout |
1523 | 629 | <BLANKLINE> | 629 | <BLANKLINE> |
1524 | 630 | >>> print stderr | 630 | >>> print stderr |
1526 | 631 | INFO creating lockfile | 631 | INFO Creating lockfile: /var/lock/launchpad-distributionmirror-prober.lock |
1527 | 632 | INFO Probing CD Image Mirrors | 632 | INFO Probing CD Image Mirrors |
1528 | 633 | INFO Probed 4 mirrors. | 633 | INFO Probed 4 mirrors. |
1529 | 634 | INFO Done. | 634 | INFO Done. |
1530 | @@ -647,7 +647,7 @@ | |||
1531 | 647 | >>> transaction.commit() | 647 | >>> transaction.commit() |
1532 | 648 | >>> prober, stdout, stderr = run_prober('--content-type=cdimage --force') | 648 | >>> prober, stdout, stderr = run_prober('--content-type=cdimage --force') |
1533 | 649 | >>> print stderr | 649 | >>> print stderr |
1535 | 650 | INFO creating lockfile | 650 | INFO Creating lockfile: /var/lock/launchpad-distributionmirror-prober.lock |
1536 | 651 | INFO Probing CD Image Mirrors | 651 | INFO Probing CD Image Mirrors |
1537 | 652 | INFO Probed 4 mirrors. | 652 | INFO Probed 4 mirrors. |
1538 | 653 | INFO Re-enabling 1 mirror(s): | 653 | INFO Re-enabling 1 mirror(s): |
1539 | 654 | 654 | ||
1540 | === modified file 'lib/lp/registry/doc/person-karma.txt' | |||
1541 | --- lib/lp/registry/doc/person-karma.txt 2010-03-15 12:32:37 +0000 | |||
1542 | +++ lib/lp/registry/doc/person-karma.txt 2010-04-07 18:05:36 +0000 | |||
1543 | @@ -131,7 +131,7 @@ | |||
1544 | 131 | ... stderr=subprocess.PIPE) | 131 | ... stderr=subprocess.PIPE) |
1545 | 132 | >>> (out, err) = process.communicate() | 132 | >>> (out, err) = process.communicate() |
1546 | 133 | >>> print err | 133 | >>> print err |
1548 | 134 | INFO creating lockfile | 134 | INFO Creating lockfile: /var/lock/launchpad-karma-update.lock |
1549 | 135 | INFO Updating Launchpad karma caches | 135 | INFO Updating Launchpad karma caches |
1550 | 136 | INFO Step A: Calculating individual KarmaCache entries | 136 | INFO Step A: Calculating individual KarmaCache entries |
1551 | 137 | INFO Scaling bugs by a factor of 2.6667 (capped to 2.0000) | 137 | INFO Scaling bugs by a factor of 2.6667 (capped to 2.0000) |
1552 | 138 | 138 | ||
1553 | === modified file 'lib/lp/registry/doc/sourceforge-remote-products.txt' | |||
1554 | --- lib/lp/registry/doc/sourceforge-remote-products.txt 2009-06-02 08:20:49 +0000 | |||
1555 | +++ lib/lp/registry/doc/sourceforge-remote-products.txt 2010-04-07 18:05:36 +0000 | |||
1556 | @@ -117,7 +117,7 @@ | |||
1557 | 117 | 0 | 117 | 0 |
1558 | 118 | 118 | ||
1559 | 119 | >>> print err | 119 | >>> print err |
1561 | 120 | INFO creating lockfile | 120 | INFO Creating lockfile: /var/lock/launchpad-updateremoteproduct.lock |
1562 | 121 | INFO No Products to update. | 121 | INFO No Products to update. |
1563 | 122 | INFO Time for this run: ... seconds. | 122 | INFO Time for this run: ... seconds. |
1564 | 123 | DEBUG Removing lock file:... | 123 | DEBUG Removing lock file:... |
1565 | 124 | 124 | ||
1566 | === modified file 'lib/lp/registry/doc/standing.txt' | |||
1567 | --- lib/lp/registry/doc/standing.txt 2009-08-13 19:03:36 +0000 | |||
1568 | +++ lib/lp/registry/doc/standing.txt 2010-04-07 18:05:36 +0000 | |||
1569 | @@ -260,7 +260,7 @@ | |||
1570 | 260 | >>> print stdout | 260 | >>> print stdout |
1571 | 261 | <BLANKLINE> | 261 | <BLANKLINE> |
1572 | 262 | >>> print stderr | 262 | >>> print stderr |
1574 | 263 | INFO creating lockfile | 263 | INFO Creating lockfile: /var/lock/launchpad-update-personal-standing.lock |
1575 | 264 | INFO Updating personal standings | 264 | INFO Updating personal standings |
1576 | 265 | INFO Done. | 265 | INFO Done. |
1577 | 266 | <BLANKLINE> | 266 | <BLANKLINE> |
1578 | @@ -294,7 +294,7 @@ | |||
1579 | 294 | >>> print stdout | 294 | >>> print stdout |
1580 | 295 | <BLANKLINE> | 295 | <BLANKLINE> |
1581 | 296 | >>> print stderr | 296 | >>> print stderr |
1583 | 297 | INFO creating lockfile | 297 | INFO Creating lockfile: /var/lock/launchpad-update-personal-standing.lock |
1584 | 298 | INFO Updating personal standings | 298 | INFO Updating personal standings |
1585 | 299 | INFO Done. | 299 | INFO Done. |
1586 | 300 | <BLANKLINE> | 300 | <BLANKLINE> |
1587 | 301 | 301 | ||
1588 | === modified file 'lib/lp/services/job/tests/test_runner.py' | |||
1589 | --- lib/lp/services/job/tests/test_runner.py 2010-03-11 16:37:22 +0000 | |||
1590 | +++ lib/lp/services/job/tests/test_runner.py 2010-04-07 18:05:36 +0000 | |||
1591 | @@ -297,6 +297,10 @@ | |||
1592 | 297 | def __init__(self): | 297 | def __init__(self): |
1593 | 298 | self.entries = [] | 298 | self.entries = [] |
1594 | 299 | 299 | ||
1595 | 300 | def debug(self, input, *args): | ||
1596 | 301 | # We don't care about debug messages. | ||
1597 | 302 | pass | ||
1598 | 303 | |||
1599 | 300 | def info(self, input, *args): | 304 | def info(self, input, *args): |
1600 | 301 | self.entries.append(input) | 305 | self.entries.append(input) |
1601 | 302 | 306 | ||
1602 | @@ -338,7 +342,7 @@ | |||
1603 | 338 | @classmethod | 342 | @classmethod |
1604 | 339 | def runFromSource(cls, source, dbuser, logger): | 343 | def runFromSource(cls, source, dbuser, logger): |
1605 | 340 | expected_config = errorlog.ErrorReportingUtility() | 344 | expected_config = errorlog.ErrorReportingUtility() |
1607 | 341 | expected_config.configure('update_preview_diffs') | 345 | expected_config.configure('merge_proposal_jobs') |
1608 | 342 | self.assertEqual( | 346 | self.assertEqual( |
1609 | 343 | errorlog.globalErrorUtility.oops_prefix, | 347 | errorlog.globalErrorUtility.oops_prefix, |
1610 | 344 | expected_config.oops_prefix) | 348 | expected_config.oops_prefix) |
1611 | @@ -348,7 +352,7 @@ | |||
1612 | 348 | incomplete_jobs = [] | 352 | incomplete_jobs = [] |
1613 | 349 | 353 | ||
1614 | 350 | class JobCronScriptSubclass(JobCronScript): | 354 | class JobCronScriptSubclass(JobCronScript): |
1616 | 351 | config_name = 'update_preview_diffs' | 355 | config_name = 'merge_proposal_jobs' |
1617 | 352 | source_interface = IUpdatePreviewDiffJobSource | 356 | source_interface = IUpdatePreviewDiffJobSource |
1618 | 353 | 357 | ||
1619 | 354 | def __init__(self): | 358 | def __init__(self): |
1620 | 355 | 359 | ||
1621 | === modified file 'lib/lp/services/mail/sendmail.py' | |||
1622 | --- lib/lp/services/mail/sendmail.py 2010-04-07 18:05:11 +0000 | |||
1623 | +++ lib/lp/services/mail/sendmail.py 2010-04-07 18:05:36 +0000 | |||
1624 | @@ -45,10 +45,10 @@ | |||
1625 | 45 | from zope.security.proxy import isinstance as zisinstance | 45 | from zope.security.proxy import isinstance as zisinstance |
1626 | 46 | 46 | ||
1627 | 47 | from canonical.config import config | 47 | from canonical.config import config |
1628 | 48 | from canonical.launchpad import versioninfo | ||
1629 | 49 | from canonical.launchpad.helpers import is_ascii_only | ||
1630 | 48 | from canonical.lp import isZopeless | 50 | from canonical.lp import isZopeless |
1631 | 49 | from canonical.launchpad.helpers import is_ascii_only | ||
1632 | 50 | from lp.services.mail.stub import TestMailer | 51 | from lp.services.mail.stub import TestMailer |
1633 | 51 | from canonical.launchpad import versioninfo | ||
1634 | 52 | 52 | ||
1635 | 53 | # email package by default ends up encoding UTF-8 messages using base64, | 53 | # email package by default ends up encoding UTF-8 messages using base64, |
1636 | 54 | # which sucks as they look like spam to stupid spam filters. We define | 54 | # which sucks as they look like spam to stupid spam filters. We define |
1637 | @@ -409,21 +409,28 @@ | |||
1638 | 409 | message['X-Launchpad-Hash'] = hash.hexdigest() | 409 | message['X-Launchpad-Hash'] = hash.hexdigest() |
1639 | 410 | 410 | ||
1640 | 411 | raw_message = message.as_string() | 411 | raw_message = message.as_string() |
1641 | 412 | if isZopeless(): | ||
1642 | 413 | # Zopeless email sending is not unit tested, and won't be. | ||
1643 | 414 | # The zopeless specific stuff is pretty simple though so this | ||
1644 | 415 | # should be fine. | ||
1645 | 416 | 412 | ||
1653 | 417 | if config.instance_name == 'testrunner': | 413 | if isZopeless() and config.instance_name == 'testrunner': |
1654 | 418 | # when running in the testing environment, store emails | 414 | # when running in the testing environment, store emails |
1655 | 419 | TestMailer().send( | 415 | TestMailer().send( |
1656 | 420 | config.canonical.bounce_address, to_addrs, raw_message) | 416 | config.canonical.bounce_address, to_addrs, raw_message) |
1650 | 421 | else: | ||
1651 | 422 | return raw_sendmail( | ||
1652 | 423 | config.canonical.bounce_address, to_addrs, raw_message) | ||
1657 | 424 | # Strip the angle brackets to the return a Message-Id consistent with | 417 | # Strip the angle brackets to the return a Message-Id consistent with |
1658 | 425 | # raw_sendmail (which doesn't include them). | 418 | # raw_sendmail (which doesn't include them). |
1659 | 426 | return message['message-id'][1:-1] | 419 | return message['message-id'][1:-1] |
1660 | 420 | elif isZopeless() and config.instance_name == 'testrunner-appserver': | ||
1661 | 421 | if config.zopeless.send_email: | ||
1662 | 422 | # Note that we simply throw away dud recipients. This is fine, | ||
1663 | 423 | # as it emulates the Z3 API which doesn't report this either | ||
1664 | 424 | # (because actual delivery is done later). | ||
1665 | 425 | smtp = SMTP( | ||
1666 | 426 | config.zopeless.smtp_host, config.zopeless.smtp_port) | ||
1667 | 427 | |||
1668 | 428 | # The "MAIL FROM" is set to the bounce address, to behave in a | ||
1669 | 429 | # way similar to mailing list software. | ||
1670 | 430 | smtp.sendmail( | ||
1671 | 431 | config.canonical.bounce_address, to_addrs, raw_message) | ||
1672 | 432 | smtp.quit() | ||
1673 | 433 | return message['message-id'][1:-1] | ||
1674 | 427 | else: | 434 | else: |
1675 | 428 | # The "MAIL FROM" is set to the bounce address, to behave in a way | 435 | # The "MAIL FROM" is set to the bounce address, to behave in a way |
1676 | 429 | # similar to mailing list software. | 436 | # similar to mailing list software. |
1677 | 430 | 437 | ||
1678 | === modified file 'lib/lp/soyuz/doc/buildd-slavescanner.txt' | |||
1679 | --- lib/lp/soyuz/doc/buildd-slavescanner.txt 2010-03-24 04:51:25 +0000 | |||
1680 | +++ lib/lp/soyuz/doc/buildd-slavescanner.txt 2010-04-07 18:05:36 +0000 | |||
1681 | @@ -500,7 +500,7 @@ | |||
1682 | 500 | * Build Log: http://.../...i386.mozilla-firefox_0.9_NEEDSBUILD.txt.gz | 500 | * Build Log: http://.../...i386.mozilla-firefox_0.9_NEEDSBUILD.txt.gz |
1683 | 501 | ... | 501 | ... |
1684 | 502 | Upload log: | 502 | Upload log: |
1686 | 503 | INFO creating lockfile | 503 | INFO Creating lockfile: /var/lock/process-upload-buildd.lock |
1687 | 504 | DEBUG Initialising connection. | 504 | DEBUG Initialising connection. |
1688 | 505 | ... | 505 | ... |
1689 | 506 | DEBUG Removing lock file: /var/lock/process-upload-buildd.lock | 506 | DEBUG Removing lock file: /var/lock/process-upload-buildd.lock |
1690 | @@ -737,7 +737,7 @@ | |||
1691 | 737 | ... 'uploader.log')) | 737 | ... 'uploader.log')) |
1692 | 738 | 738 | ||
1693 | 739 | >>> print uploader_log.read() | 739 | >>> print uploader_log.read() |
1695 | 740 | INFO creating lockfile | 740 | INFO Creating lockfile: /var/lock/process-upload-buildd.lock |
1696 | 741 | DEBUG Initialising connection. | 741 | DEBUG Initialising connection. |
1697 | 742 | DEBUG Beginning processing | 742 | DEBUG Beginning processing |
1698 | 743 | DEBUG Creating directory /var/tmp/builddmaster/accepted | 743 | DEBUG Creating directory /var/tmp/builddmaster/accepted |
1699 | 744 | 744 | ||
1700 | === modified file 'lib/lp/soyuz/doc/gina.txt' | |||
1701 | --- lib/lp/soyuz/doc/gina.txt 2010-03-17 05:48:45 +0000 | |||
1702 | +++ lib/lp/soyuz/doc/gina.txt 2010-04-07 18:05:36 +0000 | |||
1703 | @@ -730,7 +730,7 @@ | |||
1704 | 730 | >>> proc = subprocess.Popen(gina_proc, stderr=subprocess.PIPE) | 730 | >>> proc = subprocess.Popen(gina_proc, stderr=subprocess.PIPE) |
1705 | 731 | 731 | ||
1706 | 732 | >>> print proc.stderr.read() | 732 | >>> print proc.stderr.read() |
1708 | 733 | INFO creating lockfile | 733 | INFO Creating lockfile: /var/lock/launchpad-gina.lock |
1709 | 734 | ... | 734 | ... |
1710 | 735 | INFO === Processing debian/lenny/release === | 735 | INFO === Processing debian/lenny/release === |
1711 | 736 | ... | 736 | ... |
1712 | 737 | 737 | ||
1713 | === modified file 'lib/lp/soyuz/doc/manage-chroot.txt' | |||
1714 | --- lib/lp/soyuz/doc/manage-chroot.txt 2009-04-28 12:59:43 +0000 | |||
1715 | +++ lib/lp/soyuz/doc/manage-chroot.txt 2010-04-07 18:05:36 +0000 | |||
1716 | @@ -68,7 +68,7 @@ | |||
1717 | 68 | >>> process.returncode | 68 | >>> process.returncode |
1718 | 69 | 0 | 69 | 0 |
1719 | 70 | >>> print stderr | 70 | >>> print stderr |
1721 | 71 | INFO creating lockfile | 71 | INFO Creating lockfile: /var/lock/launchpad-mangage-chroot.lock |
1722 | 72 | DEBUG Initialising ChrootManager for 'The Hoary Hedgehog Release for i386 (x86)' | 72 | DEBUG Initialising ChrootManager for 'The Hoary Hedgehog Release for i386 (x86)' |
1723 | 73 | DEBUG LibraryFileAlias: ..., 25 bytes, 04a60337a417012f7c51fb56d59d2d0d | 73 | DEBUG LibraryFileAlias: ..., 25 bytes, 04a60337a417012f7c51fb56d59d2d0d |
1724 | 74 | DEBUG PocketChroot for 'The Hoary Hedgehog Release for i386 (x86)' (1) added. | 74 | DEBUG PocketChroot for 'The Hoary Hedgehog Release for i386 (x86)' (1) added. |
1725 | 75 | 75 | ||
1726 | === modified file 'lib/lp/soyuz/doc/package-cache-script.txt' | |||
1727 | --- lib/lp/soyuz/doc/package-cache-script.txt 2009-04-28 12:59:43 +0000 | |||
1728 | +++ lib/lp/soyuz/doc/package-cache-script.txt 2010-04-07 18:05:36 +0000 | |||
1729 | @@ -46,7 +46,7 @@ | |||
1730 | 46 | >>> print stdout | 46 | >>> print stdout |
1731 | 47 | 47 | ||
1732 | 48 | >>> print stderr | 48 | >>> print stderr |
1734 | 49 | INFO creating lockfile | 49 | INFO Creating lockfile: /var/lock/launchpad-update-cache.lock |
1735 | 50 | INFO Updating ubuntu package counters | 50 | INFO Updating ubuntu package counters |
1736 | 51 | INFO Updating ubuntu main archives | 51 | INFO Updating ubuntu main archives |
1737 | 52 | ... | 52 | ... |
1738 | 53 | 53 | ||
1739 | === modified file 'lib/lp/soyuz/scripts/tests/test_processupload.py' | |||
1740 | --- lib/lp/soyuz/scripts/tests/test_processupload.py 2009-06-25 04:06:00 +0000 | |||
1741 | +++ lib/lp/soyuz/scripts/tests/test_processupload.py 2010-04-07 18:05:36 +0000 | |||
1742 | @@ -76,7 +76,7 @@ | |||
1743 | 76 | # proper log message | 76 | # proper log message |
1744 | 77 | self.assertEqual(1, returncode) | 77 | self.assertEqual(1, returncode) |
1745 | 78 | self.assertEqual( | 78 | self.assertEqual( |
1747 | 79 | ['INFO creating lockfile', | 79 | ['INFO Creating lockfile: /var/lock/process-upload-insecure.lock', |
1748 | 80 | 'DEBUG Lockfile /var/lock/process-upload-insecure.lock in use' | 80 | 'DEBUG Lockfile /var/lock/process-upload-insecure.lock in use' |
1749 | 81 | ], err.splitlines()) | 81 | ], err.splitlines()) |
1750 | 82 | 82 | ||
1751 | 83 | 83 | ||
1752 | === modified file 'lib/lp/translations/doc/distroseries-translations-copy.txt' | |||
1753 | --- lib/lp/translations/doc/distroseries-translations-copy.txt 2010-02-19 16:54:42 +0000 | |||
1754 | +++ lib/lp/translations/doc/distroseries-translations-copy.txt 2010-04-07 18:05:36 +0000 | |||
1755 | @@ -193,7 +193,8 @@ | |||
1756 | 193 | >>> returnvalue | 193 | >>> returnvalue |
1757 | 194 | 1 | 194 | 1 |
1758 | 195 | >>> print error_output | 195 | >>> print error_output |
1760 | 196 | INFO creating lockfile | 196 | INFO Creating lockfile: |
1761 | 197 | /var/lock/launchpad-copy-missing-translations-foobuntu-darty.lock | ||
1762 | 197 | ERROR Before this process starts, set the hide_all_translations and | 198 | ERROR Before this process starts, set the hide_all_translations and |
1763 | 198 | defer_translation_imports flags for distribution foobuntu, series | 199 | defer_translation_imports flags for distribution foobuntu, series |
1764 | 199 | darty; or use the --force option to make it happen | 200 | darty; or use the --force option to make it happen |
1765 | @@ -219,7 +220,8 @@ | |||
1766 | 219 | >>> returnvalue | 220 | >>> returnvalue |
1767 | 220 | 0 | 221 | 0 |
1768 | 221 | >>> print error_output | 222 | >>> print error_output |
1770 | 222 | INFO creating lockfile | 223 | INFO Creating lockfile: |
1771 | 224 | /var/lock/launchpad-copy-missing-translations-foobuntu-darty.lock | ||
1772 | 223 | INFO Starting... | 225 | INFO Starting... |
1773 | 224 | INFO Populating blank distroseries darty with translations from barty. | 226 | INFO Populating blank distroseries darty with translations from barty. |
1774 | 225 | INFO Extracting from POTemplate into | 227 | INFO Extracting from POTemplate into |
1775 | 226 | 228 | ||
1776 | === modified file 'lib/lp/translations/doc/fix_translation_credits.txt' | |||
1777 | --- lib/lp/translations/doc/fix_translation_credits.txt 2009-11-06 09:41:12 +0000 | |||
1778 | +++ lib/lp/translations/doc/fix_translation_credits.txt 2010-04-07 18:05:36 +0000 | |||
1779 | @@ -9,7 +9,8 @@ | |||
1780 | 9 | >>> print returncode | 9 | >>> print returncode |
1781 | 10 | 0 | 10 | 0 |
1782 | 11 | >>> print err | 11 | >>> print err |
1784 | 12 | INFO creating lockfile | 12 | INFO Creating lockfile: |
1785 | 13 | /var/lock/launchpad-fix-translation-credits.lock | ||
1786 | 13 | INFO Figuring out POFiles that need fixing: this may take a while... | 14 | INFO Figuring out POFiles that need fixing: this may take a while... |
1787 | 14 | INFO Marking up a total of 3 credits as translated. | 15 | INFO Marking up a total of 3 credits as translated. |
1788 | 15 | INFO Processed ... | 16 | INFO Processed ... |
1789 | 16 | 17 | ||
1790 | === modified file 'lib/lp/translations/doc/poexport-language-pack.txt' | |||
1791 | --- lib/lp/translations/doc/poexport-language-pack.txt 2009-11-17 09:50:33 +0000 | |||
1792 | +++ lib/lp/translations/doc/poexport-language-pack.txt 2010-04-07 18:05:36 +0000 | |||
1793 | @@ -546,7 +546,8 @@ | |||
1794 | 546 | >>> print err | 546 | >>> print err |
1795 | 547 | INFO Setting lockfile name to | 547 | INFO Setting lockfile name to |
1796 | 548 | launchpad-language-pack-exporter__ubuntu__hoary.lock. | 548 | launchpad-language-pack-exporter__ubuntu__hoary.lock. |
1798 | 549 | INFO creating lockfile | 549 | INFO Creating lockfile: |
1799 | 550 | /var/lock/launchpad-language-pack-exporter__ubuntu__hoary.lock | ||
1800 | 550 | INFO Exporting translations for series hoary of distribution ubuntu. | 551 | INFO Exporting translations for series hoary of distribution ubuntu. |
1801 | 551 | INFO Number of PO files to export: 12 | 552 | INFO Number of PO files to export: 12 |
1802 | 552 | INFO Exporting XPI template files. | 553 | INFO Exporting XPI template files. |
1803 | 553 | 554 | ||
1804 | === modified file 'lib/lp/translations/doc/poexport-request.txt' | |||
1805 | --- lib/lp/translations/doc/poexport-request.txt 2010-03-05 20:40:40 +0000 | |||
1806 | +++ lib/lp/translations/doc/poexport-request.txt 2010-04-07 18:05:36 +0000 | |||
1807 | @@ -266,7 +266,7 @@ | |||
1808 | 266 | ... ) | 266 | ... ) |
1809 | 267 | >>> (output, empty) = process.communicate() | 267 | >>> (output, empty) = process.communicate() |
1810 | 268 | >>> print output | 268 | >>> print output |
1812 | 269 | INFO creating lockfile | 269 | INFO Creating lockfile: /var/lock/launchpad-rosetta-export-queue.lock |
1813 | 270 | DEBUG Exporting objects for Happy Downloader, related to template | 270 | DEBUG Exporting objects for Happy Downloader, related to template |
1814 | 271 | evolution-2.2 in Evolution trunk | 271 | evolution-2.2 in Evolution trunk |
1815 | 272 | DEBUG Exporting objects for Happy Downloader, related to template | 272 | DEBUG Exporting objects for Happy Downloader, related to template |
1816 | 273 | 273 | ||
1817 | === modified file 'lib/lp/translations/doc/pofile-verify-stats.txt' | |||
1818 | --- lib/lp/translations/doc/pofile-verify-stats.txt 2009-08-10 16:52:41 +0000 | |||
1819 | +++ lib/lp/translations/doc/pofile-verify-stats.txt 2010-04-07 18:05:36 +0000 | |||
1820 | @@ -176,7 +176,7 @@ | |||
1821 | 176 | >>> print returncode | 176 | >>> print returncode |
1822 | 177 | 0 | 177 | 0 |
1823 | 178 | >>> print err | 178 | >>> print err |
1825 | 179 | INFO creating lockfile | 179 | INFO Creating lockfile: /var/lock/launchpad-pofile-stats-daily.lock |
1826 | 180 | INFO Verifying stats of POFiles updated in the last ... days. | 180 | INFO Verifying stats of POFiles updated in the last ... days. |
1827 | 181 | INFO Verifying a total of 1 POFiles. | 181 | INFO Verifying a total of 1 POFiles. |
1828 | 182 | INFO Done. | 182 | INFO Done. |
1829 | @@ -192,7 +192,7 @@ | |||
1830 | 192 | >>> print returncode | 192 | >>> print returncode |
1831 | 193 | 0 | 193 | 0 |
1832 | 194 | >>> print err | 194 | >>> print err |
1834 | 195 | INFO creating lockfile | 195 | INFO Creating lockfile: /var/lock/launchpad-pofile-stats.lock |
1835 | 196 | INFO Starting verification of POFile stats at id 99 | 196 | INFO Starting verification of POFile stats at id 99 |
1836 | 197 | INFO Done. | 197 | INFO Done. |
1837 | 198 | 198 | ||
1838 | 199 | 199 | ||
1839 | === modified file 'lib/lp/translations/doc/rosetta-poimport-script.txt' | |||
1840 | --- lib/lp/translations/doc/rosetta-poimport-script.txt 2009-11-17 09:50:33 +0000 | |||
1841 | +++ lib/lp/translations/doc/rosetta-poimport-script.txt 2010-04-07 18:05:36 +0000 | |||
1842 | @@ -88,7 +88,7 @@ | |||
1843 | 88 | >>> process.returncode | 88 | >>> process.returncode |
1844 | 89 | 0 | 89 | 0 |
1845 | 90 | >>> print stderr | 90 | >>> print stderr |
1847 | 91 | INFO creating lockfile | 91 | INFO Creating lockfile: /var/lock/launchpad-rosetta-poimport.lock |
1848 | 92 | INFO Importing: Serbian (sr) translation of evolution-2.2 in Evolution trunk | 92 | INFO Importing: Serbian (sr) translation of evolution-2.2 in Evolution trunk |
1849 | 93 | INFO Import requests completed. | 93 | INFO Import requests completed. |
1850 | 94 | <BLANKLINE> | 94 | <BLANKLINE> |
1851 | 95 | 95 | ||
1852 | === modified file 'lib/lp/translations/doc/sourcepackagerelease-translations.txt' | |||
1853 | --- lib/lp/translations/doc/sourcepackagerelease-translations.txt 2009-07-20 15:05:42 +0000 | |||
1854 | +++ lib/lp/translations/doc/sourcepackagerelease-translations.txt 2010-04-07 18:05:36 +0000 | |||
1855 | @@ -93,7 +93,8 @@ | |||
1856 | 93 | ... ) | 93 | ... ) |
1857 | 94 | >>> (output, empty) = process.communicate() | 94 | >>> (output, empty) = process.communicate() |
1858 | 95 | >>> print output | 95 | >>> print output |
1860 | 96 | INFO creating lockfile | 96 | INFO Creating lockfile: |
1861 | 97 | /var/lock/launchpad-translations-import-queue-gardener.lock | ||
1862 | 97 | INFO The automatic approval system approved some entries. | 98 | INFO The automatic approval system approved some entries. |
1863 | 98 | INFO Removed 2 entries from the queue. | 99 | INFO Removed 2 entries from the queue. |
1864 | 99 | <BLANKLINE> | 100 | <BLANKLINE> |
1865 | @@ -108,7 +109,7 @@ | |||
1866 | 108 | ... ) | 109 | ... ) |
1867 | 109 | >>> (output, empty) = process.communicate() | 110 | >>> (output, empty) = process.communicate() |
1868 | 110 | >>> print output | 111 | >>> print output |
1870 | 111 | INFO creating lockfile | 112 | INFO Creating lockfile: /var/lock/launchpad-rosetta-poimport.lock |
1871 | 112 | INFO Importing: Spanish (es) translation of pmount in Ubuntu Hoary package "pmount" | 113 | INFO Importing: Spanish (es) translation of pmount in Ubuntu Hoary package "pmount" |
1872 | 113 | ... | 114 | ... |
1873 | 114 | 115 | ||
1874 | 115 | 116 | ||
1875 | === modified file 'lib/lp/translations/doc/translations-export-to-branch.txt' | |||
1876 | --- lib/lp/translations/doc/translations-export-to-branch.txt 2010-03-09 04:35:26 +0000 | |||
1877 | +++ lib/lp/translations/doc/translations-export-to-branch.txt 2010-04-07 18:05:36 +0000 | |||
1878 | @@ -12,7 +12,7 @@ | |||
1879 | 12 | >>> stdout | 12 | >>> stdout |
1880 | 13 | '' | 13 | '' |
1881 | 14 | >>> print stderr | 14 | >>> print stderr |
1883 | 15 | INFO creating lockfile | 15 | INFO Creating lockfile: /var/lock/launchpad-translations-export-to-branch.lock |
1884 | 16 | INFO Exporting to translations branches. | 16 | INFO Exporting to translations branches. |
1885 | 17 | INFO Processed 0 item(s); 0 failure(s). | 17 | INFO Processed 0 item(s); 0 failure(s). |
1886 | 18 | 18 | ||
1887 | 19 | 19 | ||
1888 | === modified file 'lib/lp/translations/scripts/tests/test_translations_to_branch.py' | |||
1889 | --- lib/lp/translations/scripts/tests/test_translations_to_branch.py 2010-03-08 16:18:45 +0000 | |||
1890 | +++ lib/lp/translations/scripts/tests/test_translations_to_branch.py 2010-04-07 18:05:36 +0000 | |||
1891 | @@ -77,7 +77,7 @@ | |||
1892 | 77 | 77 | ||
1893 | 78 | self.assertEqual('', stdout) | 78 | self.assertEqual('', stdout) |
1894 | 79 | self.assertEqual( | 79 | self.assertEqual( |
1896 | 80 | 'INFO creating lockfile\n' | 80 | 'INFO Creating lockfile: /var/lock/launchpad-translations-export-to-branch.lock\n' |
1897 | 81 | 'INFO Exporting to translations branches.\n' | 81 | 'INFO Exporting to translations branches.\n' |
1898 | 82 | 'INFO Exporting Committobranch trunk series.\n' | 82 | 'INFO Exporting Committobranch trunk series.\n' |
1899 | 83 | 'INFO Processed 1 item(s); 0 failure(s).', | 83 | 'INFO Processed 1 item(s); 0 failure(s).', |
Looks fine, modulo the comment already made on skype: so long as there are some tests somewhere of the jobs running that run as the correct db user, to catch missing permissions.