Merge lp:~sinzui/launchpad/tea-and-biscuts into lp:launchpad

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 12629
Proposed branch: lp:~sinzui/launchpad/tea-and-biscuts
Merge into: lp:launchpad
Diff against target: 1008 lines (+180/-101)
36 files modified
lib/canonical/launchpad/icing/style-3-0.css.in (+3/-0)
lib/canonical/launchpad/pagetests/feeds/xx-links.txt (+1/-1)
lib/lp/answers/doc/notifications.txt (+3/-3)
lib/lp/answers/doc/question.txt (+1/-1)
lib/lp/answers/doc/questionsets.txt (+6/-6)
lib/lp/answers/stories/distribution-package-answer-contact.txt (+6/-6)
lib/lp/answers/stories/question-browse-and-search.txt (+5/-5)
lib/lp/bugs/browser/tests/bug-nomination-views.txt (+2/-2)
lib/lp/bugs/browser/tests/person-bug-views.txt (+2/-2)
lib/lp/bugs/browser/tests/test_buglisting.py (+1/-1)
lib/lp/bugs/doc/bug-reported-acknowledgement.txt (+1/-1)
lib/lp/bugs/doc/bug-reporting-guidelines.txt (+1/-1)
lib/lp/bugs/doc/bug-set-status.txt (+4/-4)
lib/lp/bugs/doc/bug.txt (+2/-2)
lib/lp/bugs/doc/bugnotification-sending.txt (+11/-11)
lib/lp/bugs/doc/bugnotificationrecipients.txt (+8/-8)
lib/lp/bugs/doc/bugsubscription.txt (+1/-1)
lib/lp/bugs/doc/initial-bug-contacts.txt (+2/-2)
lib/lp/bugs/stories/bugs/xx-bug-contacts-reports.txt (+4/-4)
lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+1/-1)
lib/lp/bugs/stories/feeds/xx-bug-atom.txt (+1/-1)
lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt (+8/-8)
lib/lp/registry/browser/distributionsourcepackage.py (+15/-0)
lib/lp/registry/browser/tests/test_distributionsourcepackage.py (+53/-1)
lib/lp/registry/doc/distribution-sourcepackage.txt (+1/-2)
lib/lp/registry/doc/sourcepackage.txt (+1/-1)
lib/lp/registry/model/distributionsourcepackage.py (+1/-1)
lib/lp/registry/stories/person/xx-person-subscriptions.txt (+8/-8)
lib/lp/registry/stories/product/xx-product-index.txt (+1/-1)
lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt (+6/-1)
lib/lp/registry/stories/webservice/xx-distribution-source-package.txt (+1/-1)
lib/lp/registry/templates/distributionsourcepackage-index.pt (+11/-10)
lib/lp/registry/templates/productseries-index.pt (+4/-0)
lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt (+1/-1)
lib/lp/soyuz/doc/sourcepackagerelease.txt (+1/-1)
lib/lp/translations/stories/standalone/custom-language-codes.txt (+2/-2)
To merge this branch: bzr merge lp:~sinzui/launchpad/tea-and-biscuts
Reviewer Review Type Date Requested Status
Brad Crittenden (community) code Approve
Review via email: mp+54041@code.launchpad.net

Description of the change

Trivial fixes set aside from other branches.

    Launchpad bug:
        https://bugs.launchpad.net/bugs/703087
        https://bugs.launchpad.net/bugs/706967
        https://bugs.launchpad.net/bugs/732625
        https://bugs.launchpad.net/bugs/735944
    Pre-implementation: no one
    Test command: ./bin/test -vv \
      -t xx-productseries-link-branch -t doc/distribution-sourcepackage
      -t TestDistributionSourceView

There are small fixes I set aside form other branches or fixed while
triaging bugs.

Bug 703087 "Dotted outline of bug description runs through text, looks bad"
    The lazr edit classes confuses browsers which outline fields that
    are not *yet* editable.

Bug 706967 "Series page missing link to view code"
    when you go to a series page there is only a link to the development
    focus branch, not a link to directly jump to the content as well.
    The link was removed from the code portlet when was added on the
    project index...it needs to be added back to the series as well.

Bug #732625 "DSP display names are miscapitalized"
    'ubiquity in ubuntu' should be 'ubiquity in Ubuntu'.

Bug #735944 "DSP page shows bug counts, but distro does not use Launchpad"
    The page should not be showing the bugs or questions. The "Report a bug"
    and "Ask a question" links are correctly hidden.

--------------------------------------------------------------------

RULES

Bug 703087 "Dotted outline of bug description runs through text, looks bad"
    * Add a CSS rule to suppress outlining of the hidden text area.

Bug 706967 "Series page missing link to view code"
    * Add the link directly to the productseries-index template.

Bug #732625 "DSP display names are miscapitalized"
    * Update the dsp.displayname attr to use distribution.displayname
    * Fix the primary test. Expect to fix lots of stories after an ec2 run.

Bug #735944 "DSP page shows bug counts, but distro does not use Launchpad"
    * Add a tales guard to counts.

QA

Bug 703087 "Dotted outline of bug description runs through text, looks bad"
    * Visit https://bugs.qastaging.launchpad.net/launchpad/+bug/703087
    * Click on the text in the description
    * Verify that the entire description is not outlined.

Bug 706967 "Series page missing link to view code"
    * Visit https://qastaging.launchpad.net/launchpad/11.12
    * Verify there is a link to view the branch content in the
      Code for this series portlet.

Bug #732625 "DSP display names are miscapitalized"
    * Visit https://bugs.qastaging.launchpad.net/ubiquity
    * Verify the package name is 'ubiquity in Ubuntu'.

Bug #735944 "DSP page shows bug counts, but distro does not use Launchpad"
    * Visit https://qastaging.launchpad.net/debian/+source/bzr
    * Verify the page show not show counts for bugs and questions.

LINT

    lib/canonical/launchpad/icing/style-3-0.css.in
    lib/lp/registry/browser/distributionsourcepackage.py
    lib/lp/registry/browser/tests/test_distributionsourcepackage.py
    lib/lp/registry/doc/distribution-sourcepackage.txt
    lib/lp/registry/model/distributionsourcepackage.py
    lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt
    lib/lp/registry/templates/distributionsourcepackage-index.pt
    lib/lp/registry/templates/productseries-index.pt

^ lint hates the two doctests. I can clean them up before I land.

IMPLEMENTATION

Added a selector rule to disable the outline automatically added by many
browsers.
    lib/canonical/launchpad/icing/style-3-0.css.in

Restored the link that was removed 6 months ago.
    lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt
    lib/lp/registry/templates/productseries-index.pt

Use the distro's displayname when making the dsp displayname. This is an
invasive change and I expect a lot of stories to need mechanical fixes
when the ec2 test completes.
    lib/lp/registry/doc/distribution-sourcepackage.txt
    lib/lp/registry/model/distributionsourcepackage.py

Added a attr to the view to help the template construct the sentence for
the services that are used.
    lib/lp/registry/browser/distributionsourcepackage.py
    lib/lp/registry/browser/tests/test_distributionsourcepackage.py
    lib/lp/registry/templates/distributionsourcepackage-index.pt

To post a comment you must log in.
Revision history for this message
Brad Crittenden (bac) wrote :

Hi Curtis,

Thanks for the melange -- I'm sure it is gratifying to clear up so many things at once.

In your tests when checking for None how about using self.assertIs(None...) instead of assertFalse? Seems more precise and I think that is one of our corporate goals.

Also your test comment was copy-n-pasted and is not true for most: # The dict values are all None.

review: Approve (code)
Revision history for this message
Robert Collins (lifeless) wrote :

On Sat, Mar 19, 2011 at 9:17 AM, Brad Crittenden <email address hidden> wrote:
> Review: Approve code
> Hi Curtis,
>
> Thanks for the melange -- I'm sure it is gratifying to clear up so many things at once.
>
> In your tests when checking for None how about using self.assertIs(None...) instead of assertFalse?  Seems more precise and I think that is one of our corporate goals.

If False or 0 or '' would be wrong, then assertIs(None...) (or
assertEqual(None, ...) would be better. If False etc would be
acceptable, then assertFalse is better.

The comment in the test says 'are None', so I think either the comment
is wrong, or the assertions are wrong.

-Rob

Revision history for this message
Curtis Hovey (sinzui) wrote :

The comments were indeed wrong. The dict values are True or False. I am using assertTrue and assertFalse in the test.

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, Mar 20, 2011 at 2:28 AM, Curtis Hovey
<email address hidden> wrote:
> The comments were indeed wrong. The dict values are True or False. I am using assertTrue and assertFalse in the test.

If they are meant to be True and False specifically, I would use
assertEqual, not assertTrue/assertFalse - as I mentioned, assertTrue
and assertFalse look at the result of bool(thing) : so '' and None and
0 will all pass assertFalse, and '1', 10, True, object() will all pass
assertTrue.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/style-3-0.css.in'
2--- lib/canonical/launchpad/icing/style-3-0.css.in 2011-03-08 00:40:50 +0000
3+++ lib/canonical/launchpad/icing/style-3-0.css.in 2011-03-19 15:06:38 +0000
4@@ -923,6 +923,9 @@
5 top: -3px;
6 margin-left: 0.5em;
7 }
8+.yui3-editable_text {
9+ outline: none;
10+ }
11 .yui3-ieditor {
12 padding-right: 288px;
13 }
14
15=== modified file 'lib/canonical/launchpad/pagetests/feeds/xx-links.txt'
16--- lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2010-10-19 18:44:31 +0000
17+++ lib/canonical/launchpad/pagetests/feeds/xx-links.txt 2011-03-19 15:06:38 +0000
18@@ -256,7 +256,7 @@
19 >>> soup.head.findAll('link', type='application/atom+xml')
20 [<link rel="alternate" type="application/atom+xml"
21 href="http://feeds.launchpad.dev/ubuntu/+source/cnews/latest-bugs.atom"
22- title="Latest Bugs for cnews in ubuntu" />]
23+ title="Latest Bugs for cnews in Ubuntu" />]
24
25
26 == Latest Branches for a ProjectGroup ==
27
28=== modified file 'lib/lp/answers/doc/notifications.txt'
29--- lib/lp/answers/doc/notifications.txt 2010-10-18 22:24:59 +0000
30+++ lib/lp/answers/doc/notifications.txt 2011-03-19 15:06:38 +0000
31@@ -136,10 +136,10 @@
32 [Question #...]: Installer doesn't work on a Mac
33
34 >>> print notification_body #doctest: -NORMALIZE_WHITESPACE
35- Question #... libstdc++ in ubuntu changed:
36+ Question #... libstdc++ in Ubuntu changed:
37 http://.../ubuntu/+source/libstdc++/+question/...
38 <BLANKLINE>
39- Project: Ubuntu => libstdc++ in ubuntu
40+ Project: Ubuntu => libstdc++ in Ubuntu
41 <BLANKLINE>
42 Summary changed to:
43 Installer doesn't work on a Mac
44@@ -174,7 +174,7 @@
45 Question #... Ubuntu changed:
46 http://.../ubuntu/+question/...
47 <BLANKLINE>
48- Project: libstdc++ in ubuntu => Ubuntu
49+ Project: libstdc++ in Ubuntu => Ubuntu
50 <BLANKLINE>
51 --...
52 You received this question notification because you are the assignee for
53
54=== modified file 'lib/lp/answers/doc/question.txt'
55--- lib/lp/answers/doc/question.txt 2010-10-18 22:24:59 +0000
56+++ lib/lp/answers/doc/question.txt 2011-03-19 15:06:38 +0000
57@@ -157,7 +157,7 @@
58
59 >>> firefox_question.target = evolution_in_ubuntu
60 >>> print firefox_question.target.displayname
61- evolution in ubuntu
62+ evolution in Ubuntu
63 >>> print firefox_question.distribution.name
64 ubuntu
65 >>> print firefox_question.sourcepackagename.name
66
67=== modified file 'lib/lp/answers/doc/questionsets.txt'
68--- lib/lp/answers/doc/questionsets.txt 2011-02-17 17:02:54 +0000
69+++ lib/lp/answers/doc/questionsets.txt 2011-03-19 15:06:38 +0000
70@@ -54,7 +54,7 @@
71 Problemas de Impressao no Firefox Mozilla Firefox
72 Firefox loses focus and gets stuck Mozilla Firefox
73 Firefox cannot render Bank Site Mozilla Firefox
74- mailto: problem in webpage mozilla-firefox in ubuntu
75+ mailto: problem in webpage mozilla-firefox in Ubuntu
76 Newly installed plug-in doesn't seem to be used Mozilla Firefox
77 Problem showing the SVG demo on W3C site Mozilla Firefox
78 AINKAFSEEN ALEFLAMTEHGHAINYEHYEHREHALEFTEH ... Ubuntu
79@@ -72,7 +72,7 @@
80 ... status=QuestionStatus.INVALID):
81 ... print question.title, question.status.title, (
82 ... question.target.displayname)
83- Firefox is slow and consumes too ... Invalid mozilla-firefox in ubuntu
84+ Firefox is slow and consumes too ... Invalid mozilla-firefox in Ubuntu
85
86 The status parameter can also take a list of statuses.
87
88@@ -80,8 +80,8 @@
89 ... status=[QuestionStatus.SOLVED, QuestionStatus.INVALID]):
90 ... print question.title, question.status.title, (
91 ... question.target.displayname)
92- mailto: problem in webpage Solved mozilla-firefox in ubuntu
93- Firefox is slow and consumes too ... Invalid mozilla-firefox in ubuntu
94+ mailto: problem in webpage Solved mozilla-firefox in Ubuntu
95+ Firefox is slow and consumes too ... Invalid mozilla-firefox in Ubuntu
96
97
98 Language
99@@ -109,7 +109,7 @@
100 ... print ascii_smash(question.title), question.status.title, (
101 ... question.target.displayname)
102 Problemas de Impressao no Firefox Open Mozilla Firefox
103- Firefox is slow and consumes too much ... mozilla-firefox in ubuntu
104+ Firefox is slow and consumes too much ... mozilla-firefox in Ubuntu
105 Firefox loses focus and gets stuck Open Mozilla Firefox
106 Firefox cannot render Bank Site Open Mozilla Firefox
107 Problem showing the SVG demo on W3C site Open Mozilla Firefox
108@@ -133,7 +133,7 @@
109 2 Problem showing the SVG demo on W3C site Mozilla Firefox
110 4 Firefox loses focus and gets stuck Mozilla Firefox
111 6 Newly installed plug-in doesn't seem to be used Mozilla Firefox
112- 9 mailto: problem in webpage mozilla-firefox in ubuntu
113+ 9 mailto: problem in webpage mozilla-firefox in Ubuntu
114 13 Problemas de Impressao no Firefox Mozilla Firefox
115
116 When no text search is done, the default sort order is by newest first.
117
118=== modified file 'lib/lp/answers/stories/distribution-package-answer-contact.txt'
119--- lib/lp/answers/stories/distribution-package-answer-contact.txt 2010-10-18 22:24:59 +0000
120+++ lib/lp/answers/stories/distribution-package-answer-contact.txt 2011-03-19 15:06:38 +0000
121@@ -30,7 +30,7 @@
122 >>> anon_browser.getLink('Answers').click()
123 >>> portlet = find_portlet(
124 ... anon_browser.contents,
125- ... 'Answer contacts for evolution in ubuntu')
126+ ... 'Answer contacts for evolution in Ubuntu')
127 >>> print portlet.first('div').renderContents()
128 <p>
129 <i>There are no answer contacts.</i>
130@@ -77,16 +77,16 @@
131 >>> browser.getControl('Continue').click()
132 >>> for message in find_tags_by_class(browser.contents, 'message'):
133 ... print extract_text(message)
134- You have been added as an answer contact for evolution in ubuntu.
135+ You have been added as an answer contact for evolution in Ubuntu.
136 English was added to Landscape Developers's preferred languages.
137 Landscape Developers has been added as an answer contact for
138- evolution in ubuntu.
139+ evolution in Ubuntu.
140
141 The answer contacts portlet for the source package was updated:
142
143 >>> for answer_contact in find_portlet(
144 ... browser.contents,
145- ... 'Answer contacts for evolution in ubuntu').fetch('a'):
146+ ... 'Answer contacts for evolution in Ubuntu').fetch('a'):
147 ... print answer_contact.renderContents()
148 Landscape Developers
149 Sample Person
150@@ -108,11 +108,11 @@
151 >>> browser.getControl('Continue').click()
152 >>> for message in find_tags_by_class(browser.contents, 'message'):
153 ... print message.renderContents()
154- You have been removed as an answer contact for evolution in ubuntu.
155+ You have been removed as an answer contact for evolution in Ubuntu.
156
157 >>> for answer_contact in find_portlet(
158 ... browser.contents,
159- ... 'Answer contacts for evolution in ubuntu').fetch('a'):
160+ ... 'Answer contacts for evolution in Ubuntu').fetch('a'):
161 ... print answer_contact.renderContents()
162 Landscape Developers
163
164
165=== modified file 'lib/lp/answers/stories/question-browse-and-search.txt'
166--- lib/lp/answers/stories/question-browse-and-search.txt 2010-08-25 15:00:07 +0000
167+++ lib/lp/answers/stories/question-browse-and-search.txt 2011-03-19 15:06:38 +0000
168@@ -377,7 +377,7 @@
169 ... '+questions')
170 >>> sample_person_browser.getLink('My questions').click()
171 >>> print repr(sample_person_browser.title)
172- 'Questions you asked about mozilla-firefox in ubuntu : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
173+ 'Questions you asked about mozilla-firefox in Ubuntu : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
174 >>> questions = find_tag_by_id(
175 ... sample_person_browser.contents, 'question-listing')
176 >>> for question in questions.fetch('td', 'questionTITLE'):
177@@ -513,13 +513,13 @@
178 ... print question.first('a').renderContents()
179 Ubuntu
180 Ubuntu
181- mozilla-firefox in ubuntu
182- mozilla-firefox in ubuntu
183+ mozilla-firefox in Ubuntu
184+ mozilla-firefox in Ubuntu
185 Ubuntu
186
187 These contexts are links to the context question listing.
188
189- >>> browser.getLink('mozilla-firefox in ubuntu').click()
190+ >>> browser.getLink('mozilla-firefox in Ubuntu').click()
191 >>> print repr(browser.title)
192 'Questions : \xe2\x80\x9cmozilla-firefox\xe2\x80\x9d package : Ubuntu'
193
194@@ -709,7 +709,7 @@
195 >>> print_questions_with_target(browser.contents)
196 Firefox loses focus and gets stuck Mozilla Firefox
197 Firefox cannot render Bank Site Mozilla Firefox
198- mailto: problem in webpage mozilla-firefox in ubuntu
199+ mailto: problem in webpage mozilla-firefox in Ubuntu
200 Newly installed plug-in doesn't seem to be used Mozilla Firefox
201 Problem showing the SVG demo on W3C site Mozilla Firefox
202
203
204=== modified file 'lib/lp/bugs/browser/tests/bug-nomination-views.txt'
205--- lib/lp/bugs/browser/tests/bug-nomination-views.txt 2010-10-21 01:42:14 +0000
206+++ lib/lp/bugs/browser/tests/bug-nomination-views.txt 2011-03-19 15:06:38 +0000
207@@ -330,7 +330,7 @@
208 >>> IPrimaryContext(firefox_nomination).context == bugtarget
209 True
210
211-The source package 'mozilla-firefox in ubuntu' is the IBugTarget in
212+The source package 'mozilla-firefox in Ubuntu' is the IBugTarget in
213 /ubuntu/+source/mozilla-firefox/+bug/1/nominations/2/+editstatus.
214
215 >>> ubuntu_firefox_nomination = bugnominationset.get(2)
216@@ -343,7 +343,7 @@
217 >>> launchbag.add(bug_one_in_ubuntu_firefox.target)
218 >>> launchbag.add(bug_one_in_ubuntu_firefox)
219 >>> launchbag.bugtask.target.displayname
220- u'mozilla-firefox in ubuntu'
221+ u'mozilla-firefox in Ubuntu'
222
223 >>> bugtarget = launchbag.bugtask.target
224 >>> IPrimaryContext(ubuntu_firefox_nomination).context == bugtarget
225
226=== modified file 'lib/lp/bugs/browser/tests/person-bug-views.txt'
227--- lib/lp/bugs/browser/tests/person-bug-views.txt 2010-11-05 14:17:11 +0000
228+++ lib/lp/bugs/browser/tests/person-bug-views.txt 2011-03-19 15:06:38 +0000
229@@ -272,7 +272,7 @@
230 >>> ubuntu_firefox_bugcounts = package_bug_counts[0]
231
232 >>> ubuntu_firefox_bugcounts['package_name']
233- u'mozilla-firefox in ubuntu'
234+ u'mozilla-firefox in Ubuntu'
235 >>> ubuntu_firefox_bugcounts['package_search_url']
236 u'.../~name16/+packagebugs-search?field.distribution=ubuntu&field.sourcepackagename=mozilla-firefox&search=Search'
237
238@@ -358,7 +358,7 @@
239 pmount:
240
241 >>> packagebugs_search_view.package_bug_counts[1]['package_name']
242- u'pmount in ubuntu'
243+ u'pmount in Ubuntu'
244
245 >>> pmount = ubuntu.getSourcePackage('pmount')
246 >>> new_bug = pmount.createBug(bug_params)
247
248=== modified file 'lib/lp/bugs/browser/tests/test_buglisting.py'
249--- lib/lp/bugs/browser/tests/test_buglisting.py 2011-02-16 21:54:57 +0000
250+++ lib/lp/bugs/browser/tests/test_buglisting.py 2011-03-19 15:06:38 +0000
251@@ -49,7 +49,7 @@
252 self.assertTrue(len(top_portlet) > 0,
253 "Tag with class=top-portlet not found")
254 self.assertTextMatchesExpressionIgnoreWhitespace("""
255- test-dsp in test-distro does not use Launchpad for bug tracking.
256+ test-dsp in Test-distro does not use Launchpad for bug tracking.
257 Getting started with bug tracking in Launchpad.""",
258 extract_text(top_portlet[0]))
259
260
261=== modified file 'lib/lp/bugs/doc/bug-reported-acknowledgement.txt'
262--- lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2010-10-18 22:24:59 +0000
263+++ lib/lp/bugs/doc/bug-reported-acknowledgement.txt 2011-03-19 15:06:38 +0000
264@@ -120,4 +120,4 @@
265 >>> check_access(
266 ... distribution_source_package.distribution.owner.activemembers[0],
267 ... distribution_source_package)
268- alsa-utils in ubuntu let Alexander Limi have access.
269+ alsa-utils in Ubuntu let Alexander Limi have access.
270
271=== modified file 'lib/lp/bugs/doc/bug-reporting-guidelines.txt'
272--- lib/lp/bugs/doc/bug-reporting-guidelines.txt 2010-10-18 22:24:59 +0000
273+++ lib/lp/bugs/doc/bug-reporting-guidelines.txt 2011-03-19 15:06:38 +0000
274@@ -119,4 +119,4 @@
275 >>> check_access(
276 ... distribution_source_package.distribution.owner.activemembers[0],
277 ... distribution_source_package)
278- alsa-utils in ubuntu let Alexander Limi have access.
279+ alsa-utils in Ubuntu let Alexander Limi have access.
280
281=== modified file 'lib/lp/bugs/doc/bug-set-status.txt'
282--- lib/lp/bugs/doc/bug-set-status.txt 2011-02-07 20:41:06 +0000
283+++ lib/lp/bugs/doc/bug-set-status.txt 2011-03-19 15:06:38 +0000
284@@ -9,7 +9,7 @@
285 >>> from lp.bugs.interfaces.bug import CreateBugParams
286 >>> from lp.bugs.interfaces.bugtask import BugTaskStatus
287 >>> from lp.registry.interfaces.product import IProductSet
288-
289+
290 >>> with lp_dbuser():
291 ... login('no-priv@canonical.com')
292 ... no_priv = getUtility(IPersonSet).getByName('no-priv')
293@@ -168,7 +168,7 @@
294 >>> ubuntu_firefox_task = bug.setStatus(
295 ... ubuntu_firefox, BugTaskStatus.INCOMPLETE, no_priv)
296 >>> ubuntu_firefox_task.target.displayname
297- u'mozilla-firefox in ubuntu'
298+ u'mozilla-firefox in Ubuntu'
299 >>> ubuntu_firefox_task.status.name
300 'INCOMPLETE'
301
302@@ -181,7 +181,7 @@
303 >>> ubuntu_firefox_task = bug.setStatus(
304 ... warty_firefox, BugTaskStatus.CONFIRMED, no_priv)
305 >>> ubuntu_firefox_task.target.displayname
306- u'mozilla-firefox in ubuntu'
307+ u'mozilla-firefox in Ubuntu'
308 >>> ubuntu_firefox_task.status.name
309 'CONFIRMED'
310
311@@ -190,7 +190,7 @@
312 >>> ubuntu_firefox_task = bug.setStatus(
313 ... hoary_firefox, BugTaskStatus.NEW, no_priv)
314 >>> ubuntu_firefox_task.target.displayname
315- u'mozilla-firefox in ubuntu'
316+ u'mozilla-firefox in Ubuntu'
317 >>> ubuntu_firefox_task.status.name
318 'NEW'
319
320
321=== modified file 'lib/lp/bugs/doc/bug.txt'
322--- lib/lp/bugs/doc/bug.txt 2011-03-11 15:43:27 +0000
323+++ lib/lp/bugs/doc/bug.txt 2011-03-19 15:06:38 +0000
324@@ -984,7 +984,7 @@
325 Tomcat
326 Ubuntu
327 Hoary
328- mozilla-firefox in debian
329+ mozilla-firefox in Debian
330 mozilla-firefox in Debian Woody
331
332 You can also get a list of the "LP pillars" affected by a particular bug.
333@@ -1019,7 +1019,7 @@
334 >>> mozilla_in_debian = debian.getSourcePackage('mozilla-firefox')
335 >>> mozilla_in_debian_task = bug_two.getBugTask(mozilla_in_debian)
336 >>> mozilla_in_debian_task.target.displayname
337- u'mozilla-firefox in debian'
338+ u'mozilla-firefox in Debian'
339
340 >>> debian_woody = debian.getSeries('woody')
341 >>> mozilla_in_woody = debian_woody.getSourcePackage('mozilla-firefox')
342
343=== modified file 'lib/lp/bugs/doc/bugnotification-sending.txt'
344--- lib/lp/bugs/doc/bugnotification-sending.txt 2011-02-22 10:44:48 +0000
345+++ lib/lp/bugs/doc/bugnotification-sending.txt 2011-03-19 15:06:38 +0000
346@@ -69,13 +69,13 @@
347 To: foo.bar@canonical.com
348 From: Sample Person <1@bugs.launchpad.net>
349 Subject: [Bug 1] subject
350- X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu)
351+ X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in Ubuntu)
352 <BLANKLINE>
353 a comment.
354 <BLANKLINE>
355 ...
356 You received this bug notification because you are subscribed to
357- mozilla-firefox in ubuntu.
358+ mozilla-firefox in Ubuntu.
359 http://bugs.launchpad.dev/bugs/1
360 <BLANKLINE>
361 Title:
362@@ -609,7 +609,7 @@
363 ...
364 References: sdsdfsfd
365 ...
366- X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu)
367+ X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in Ubuntu)
368 ...
369 INFO Notifying marilize@hbd.com about bug 1.
370 ...
371@@ -627,7 +627,7 @@
372 ...
373 References: sdsdfsfd
374 ...
375- X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in ubuntu)
376+ X-Launchpad-Message-Rationale: Subscriber (mozilla-firefox in Ubuntu)
377 Errors-To: bounces@canonical.com
378 Return-Path: bounces@canonical.com
379 Precedence: bulk
380@@ -642,7 +642,7 @@
381 -- =
382 <BLANKLINE>
383 You received this bug notification because you are subscribed to
384- mozilla-firefox in ubuntu.
385+ mozilla-firefox in Ubuntu.
386 http://bugs.launchpad.dev/bugs/1
387 <BLANKLINE>
388 Title:
389@@ -1200,7 +1200,7 @@
390 To: foo.bar@canonical.com
391 ...
392 You received this bug notification because you are subscribed to
393- mozilla-firefox in ubuntu.
394+ mozilla-firefox in Ubuntu.
395 ...
396 ----------------------------------------------------------------------
397 To: marilize@hbd.com
398@@ -1261,7 +1261,7 @@
399 To: foo.bar@canonical.com
400 ...
401 You received this bug notification because you are subscribed to
402- mozilla-firefox in ubuntu.
403+ mozilla-firefox in Ubuntu.
404 ...
405 ----------------------------------------------------------------------
406 To: marilize@hbd.com
407@@ -1320,7 +1320,7 @@
408 To: foo.bar@canonical.com
409 ...
410 You received this bug notification because you are subscribed to
411- mozilla-firefox in ubuntu.
412+ mozilla-firefox in Ubuntu.
413 ...
414 ----------------------------------------------------------------------
415 To: marilize@hbd.com
416@@ -1371,7 +1371,7 @@
417 To: foo.bar@canonical.com
418 ...
419 You received this bug notification because you are subscribed to
420- mozilla-firefox in ubuntu.
421+ mozilla-firefox in Ubuntu.
422 http://bugs.launchpad.dev/bugs/1
423 ...
424 ----------------------------------------------------------------------
425@@ -1435,7 +1435,7 @@
426 To: foo.bar@canonical.com
427 ...
428 You received this bug notification because you are subscribed to
429- mozilla-firefox in ubuntu.
430+ mozilla-firefox in Ubuntu.
431 ...
432 ----------------------------------------------------------------------
433 To: marilize@hbd.com
434@@ -1497,7 +1497,7 @@
435 To: foo.bar@canonical.com
436 ...
437 You received this bug notification because you are subscribed to
438- mozilla-firefox in ubuntu.
439+ mozilla-firefox in Ubuntu.
440 http://bugs.launchpad.dev/bugs/1
441 ...
442 ----------------------------------------------------------------------
443
444=== modified file 'lib/lp/bugs/doc/bugnotificationrecipients.txt'
445--- lib/lp/bugs/doc/bugnotificationrecipients.txt 2010-12-07 17:00:18 +0000
446+++ lib/lp/bugs/doc/bugnotificationrecipients.txt 2011-03-19 15:06:38 +0000
447@@ -43,9 +43,9 @@
448
449 >>> print_rationales(recipients)
450 foo.bar@canonical.com
451- Subscriber (mozilla-firefox in ubuntu)
452+ Subscriber (mozilla-firefox in Ubuntu)
453 You received this bug notification because you are subscribed
454- to mozilla-firefox in ubuntu.
455+ to mozilla-firefox in Ubuntu.
456 mark@example.com
457 Assignee
458 You received this bug notification because you are a bug assignee.
459@@ -104,9 +104,9 @@
460
461 >>> print_rationales(recipients)
462 carlos@canonical.com
463- Subscriber (pmount in debian)
464+ Subscriber (pmount in Debian)
465 You received this bug notification because you are subscribed
466- to pmount in debian.
467+ to pmount in Debian.
468 foo.bar@canonical.com
469 Subscriber of Duplicate
470 You received this bug notification because you are a direct
471@@ -156,9 +156,9 @@
472
473 >>> print_rationales(recipients)
474 carlos@canonical.com
475- Subscriber (pmount in debian) via Bug 2
476+ Subscriber (pmount in Debian) via Bug 2
477 You received this bug notification because you are subscribed
478- to pmount in debian (via bug 2).
479+ to pmount in Debian (via bug 2).
480 foo.bar@canonical.com
481 Subscriber of Duplicate via Bug 2
482 You received this bug notification because you are a direct
483@@ -240,10 +240,10 @@
484 You received this bug notification because you are a member
485 of GuadaMen, which is a bug assignee.
486 test@canonical.com
487- Subscriber (pmount in debian) @name20
488+ Subscriber (pmount in Debian) @name20
489 You received this bug notification because you are a member
490 of Warty Security Team, which is subscribed to pmount in
491- debian.
492+ Debian.
493 tsukimi@quaqua.net
494 Subscriber of Duplicate @testing-spanish-team
495 You received this bug notification because you are a member
496
497=== modified file 'lib/lp/bugs/doc/bugsubscription.txt'
498--- lib/lp/bugs/doc/bugsubscription.txt 2011-03-07 17:34:09 +0000
499+++ lib/lp/bugs/doc/bugsubscription.txt 2011-03-19 15:06:38 +0000
500@@ -508,7 +508,7 @@
501 >>> [(address, recipients.getReason(address)[1]) for address in addresses]
502 [('foo.bar@canonical.com', 'Subscriber'),
503 ('mark@example.com', 'Subscriber'),
504- ('no-priv@canonical.com', u'Subscriber (linux-source-2.6.15 in ubuntu)'),
505+ ('no-priv@canonical.com', u'Subscriber (linux-source-2.6.15 in Ubuntu)'),
506 ('robertc@robertcollins.net', 'Subscriber'),
507 ('support@ubuntu.com', u'Subscriber @ubuntu-team'),
508 ('test@canonical.com', 'Subscriber')]
509
510=== modified file 'lib/lp/bugs/doc/initial-bug-contacts.txt'
511--- lib/lp/bugs/doc/initial-bug-contacts.txt 2011-01-20 17:05:12 +0000
512+++ lib/lp/bugs/doc/initial-bug-contacts.txt 2011-03-19 15:06:38 +0000
513@@ -177,7 +177,7 @@
514 ... bug_one_in_ubuntu_firefox.bug.initial_message.rfc822msgid)
515 True
516 >>> msg['X-Launchpad-Message-Rationale']
517- 'Subscriber (pmount in ubuntu)'
518+ 'Subscriber (pmount in Ubuntu)'
519 >>> msg['Subject']
520 '[Bug 1] [NEW] Firefox does not support SVG'
521 >>> print msg.get_payload(decode=True)
522@@ -209,7 +209,7 @@
523 Firefox does not support SVG
524 http://bugs.launchpad.dev/bugs/1
525 You received this bug notification because you
526- are subscribed to pmount in ubuntu.
527+ are subscribed to pmount in Ubuntu.
528
529 Since the reporter didn't do anything to trigger this change, the bug
530 address is used as the From address.
531
532=== modified file 'lib/lp/bugs/stories/bugs/xx-bug-contacts-reports.txt'
533--- lib/lp/bugs/stories/bugs/xx-bug-contacts-reports.txt 2010-11-05 14:17:11 +0000
534+++ lib/lp/bugs/stories/bugs/xx-bug-contacts-reports.txt 2011-03-19 15:06:38 +0000
535@@ -8,8 +8,8 @@
536 Foo Bar is subscribed to these packages.
537 ...
538 Totals 1 0 1 0
539- mozilla-firefox in ubuntu 1 0 1 0
540- pmount in ubuntu 0 0 0 0
541+ mozilla-firefox in Ubuntu 1 0 1 0
542+ pmount in Ubuntu 0 0 0 0
543
544 If we add a bug for Foo Bar these numbers will be updated:
545
546@@ -43,8 +43,8 @@
547 Foo Bar is subscribed to these packages.
548 ...
549 Totals 2 0 2 0
550- mozilla-firefox in ubuntu 1 0 1 0
551- pmount in ubuntu 1 0 1 0
552+ mozilla-firefox in Ubuntu 1 0 1 0
553+ pmount in Ubuntu 1 0 1 0
554
555 >>> transaction.abort()
556
557
558=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt'
559--- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2011-02-15 14:45:21 +0000
560+++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2011-03-19 15:06:38 +0000
561@@ -138,4 +138,4 @@
562 >>> print extract_text(
563 ... find_tag_by_id(anon_browser.contents, 'also-in-ubuntu'))
564 Ubuntu also tracks bugs for packages derived from this project:
565- test-project-package in ubuntu.
566+ test-project-package in Ubuntu.
567
568=== modified file 'lib/lp/bugs/stories/feeds/xx-bug-atom.txt'
569--- lib/lp/bugs/stories/feeds/xx-bug-atom.txt 2010-10-18 22:24:59 +0000
570+++ lib/lp/bugs/stories/feeds/xx-bug-atom.txt 2011-03-19 15:06:38 +0000
571@@ -186,7 +186,7 @@
572 ... browser.headers['content-type'], browser.url)
573 No Errors
574 >>> BSS(browser.contents).title.contents
575- [u'Bugs in thunderbird in ubuntu']
576+ [u'Bugs in thunderbird in Ubuntu']
577 >>> browser.url
578 'http://feeds.launchpad.dev/ubuntu/+source/thunderbird/latest-bugs.atom'
579 >>> soup = BSS(browser.contents, parseOnlyThese=SoupStrainer('id'))
580
581=== modified file 'lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt'
582--- lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2010-11-30 11:33:22 +0000
583+++ lib/lp/bugs/stories/structural-subscriptions/xx-bug-subscriptions.txt 2011-03-19 15:06:38 +0000
584@@ -46,7 +46,7 @@
585 ... browser.contents, 'Subscribers')).encode(
586 ... 'ascii', 'backslashreplace')
587 Subscribers
588- To all bugs in mozilla-firefox in ubuntu:
589+ To all bugs in mozilla-firefox in Ubuntu:
590 Foo Bar
591 Landscape Developers
592 Sample Person
593@@ -65,7 +65,7 @@
594 ... 'http://bugs.launchpad.dev/ubuntu/+source/mozilla-firefox/+subscribe')
595 >>> print extract_text(find_portlet(browser.contents, 'Subscribers'))
596 Subscribers
597- To all bugs in mozilla-firefox in ubuntu:
598+ To all bugs in mozilla-firefox in Ubuntu:
599 Foo Bar
600 To all Ubuntu Linux bugs:
601 Landscape Developers
602@@ -106,13 +106,13 @@
603 >>> for message in find_tags_by_class(browser.contents, 'message'):
604 ... print message.renderContents()
605 No Privileges Person will now receive an e-mail each time someone reports
606- or changes a public bug in "mozilla-firefox in ubuntu".
607+ or changes a public bug in "mozilla-firefox in Ubuntu".
608
609 >>> browser.open(
610 ... 'http://bugs.launchpad.dev/ubuntu/+source/mozilla-firefox/+subscribe')
611 >>> print extract_text(find_portlet(browser.contents, 'Subscribers'))
612 Subscribers
613- To all bugs in mozilla-firefox in ubuntu:
614+ To all bugs in mozilla-firefox in Ubuntu:
615 Foo Bar
616 No Privileges Person
617 To all Ubuntu Linux bugs:
618@@ -129,12 +129,12 @@
619 >>> print find_tags_by_class(
620 ... browser.contents, 'informational message')[0].contents[0]
621 No Privileges Person will no longer automatically receive e-mail about
622- public bugs in "mozilla-firefox in ubuntu".
623+ public bugs in "mozilla-firefox in Ubuntu".
624 >>> browser.open(
625 ... 'http://bugs.launchpad.dev/ubuntu/+source/mozilla-firefox/+subscribe')
626 >>> print extract_text(find_portlet(browser.contents, 'Subscribers'))
627 Subscribers
628- To all bugs in mozilla-firefox in ubuntu:
629+ To all bugs in mozilla-firefox in Ubuntu:
630 Foo Bar
631 To all Ubuntu Linux bugs:
632 Landscape Developers
633@@ -160,7 +160,7 @@
634
635 >>> print extract_text(find_portlet(browser.contents, 'Subscribers'))
636 Subscribers
637- To all bugs in mozilla-firefox in ubuntu:
638+ To all bugs in mozilla-firefox in Ubuntu:
639 Foo Bar
640 To all Ubuntu Linux bugs:
641 Landscape Developers
642@@ -174,7 +174,7 @@
643 ... 'http://bugs.launchpad.dev/ubuntu/+source/mozilla-firefox/+subscribe')
644 >>> print extract_text(find_portlet(browser.contents, 'Subscribers'))
645 Subscribers
646- To all bugs in mozilla-firefox in ubuntu:
647+ To all bugs in mozilla-firefox in Ubuntu:
648 Foo Bar
649 To all Ubuntu Linux bugs:
650 Landscape Developers
651
652=== modified file 'lib/lp/registry/browser/distributionsourcepackage.py'
653--- lib/lp/registry/browser/distributionsourcepackage.py 2011-03-16 10:59:54 +0000
654+++ lib/lp/registry/browser/distributionsourcepackage.py 2011-03-19 15:06:38 +0000
655@@ -57,6 +57,7 @@
656 )
657 from lp.answers.interfaces.questionenums import QuestionStatus
658 from lp.app.browser.tales import CustomizableFormatter
659+from lp.app.enums import ServiceUsage
660 from lp.app.interfaces.launchpad import IServiceUsage
661 from lp.bugs.browser.bugtask import BugTargetTraversalMixin
662 from lp.bugs.browser.structuralsubscription import (
663@@ -516,6 +517,20 @@
664 """Return result set containing open questions for this package."""
665 return self.context.searchQuestions(status=QuestionStatus.OPEN)
666
667+ @cachedproperty
668+ def bugs_answers_usage(self):
669+ """Return a dict of uses_bugs, uses_answers, uses_both, uses_either.
670+ """
671+ service_usage = IServiceUsage(self.context)
672+ uses_bugs = (
673+ service_usage.bug_tracking_usage == ServiceUsage.LAUNCHPAD)
674+ uses_answers = service_usage.answers_usage == ServiceUsage.LAUNCHPAD
675+ uses_both = uses_bugs and uses_answers
676+ uses_either = uses_bugs or uses_answers
677+ return dict(
678+ uses_bugs=uses_bugs, uses_answers=uses_answers,
679+ uses_both=uses_both, uses_either=uses_either)
680+
681
682 class DistributionSourcePackageChangelogView(
683 DistributionSourcePackageBaseView, LaunchpadView):
684
685=== modified file 'lib/lp/registry/browser/tests/test_distributionsourcepackage.py'
686--- lib/lp/registry/browser/tests/test_distributionsourcepackage.py 2011-03-16 10:59:54 +0000
687+++ lib/lp/registry/browser/tests/test_distributionsourcepackage.py 2011-03-19 15:06:38 +0000
688@@ -12,6 +12,7 @@
689 DatabaseFunctionalLayer,
690 LaunchpadFunctionalLayer,
691 )
692+from lp.app.enums import ServiceUsage
693 from lp.soyuz.interfaces.archive import ArchivePurpose
694 from lp.testing import (
695 celebrity_logged_in,
696@@ -19,6 +20,7 @@
697 TestCaseWithFactory,
698 )
699 from lp.testing.matchers import BrowsesWithQueryLimit
700+from lp.testing.views import create_view
701
702
703 class TestDistributionSourcePackageFormatterAPI(TestCaseWithFactory):
704@@ -31,7 +33,7 @@
705 dsp = ubuntu.getSourcePackage('mouse')
706 markup = (
707 u'<a href="/ubuntu/+source/mouse" class="sprite package-source">'
708- u'mouse in ubuntu</a>')
709+ u'mouse in Ubuntu</a>')
710 self.assertEqual(markup, test_tales('dsp/fmt:link', dsp=dsp))
711
712
713@@ -53,3 +55,53 @@
714 self.factory.makePackageDiff(
715 to_source=spph.sourcepackagerelease)
716 self.assertThat(dsp, changelog_browses_under_limit)
717+
718+
719+class TestDistributionSourceView(TestCaseWithFactory):
720+
721+ layer = DatabaseFunctionalLayer
722+
723+ def setUp(self):
724+ super(TestDistributionSourceView, self).setUp()
725+ sourcepackagename = self.factory.makeSourcePackageName('mouse')
726+ distro = self.factory.makeDistribution()
727+ self.dsp = distro.getSourcePackage('mouse')
728+
729+ def test_bugs_answers_usage_none(self):
730+ # The dict values are all False.
731+ view = create_view(self.dsp, '+index')
732+ self.assertFalse(view.bugs_answers_usage['uses_bugs'])
733+ self.assertFalse(view.bugs_answers_usage['uses_answers'])
734+ self.assertFalse(view.bugs_answers_usage['uses_both'])
735+ self.assertFalse(view.bugs_answers_usage['uses_either'])
736+
737+ def test_bugs_answers_usage_bugs(self):
738+ # The dict values are True for bugs and either.
739+ with celebrity_logged_in('admin'):
740+ self.dsp.distribution.official_malone = True
741+ view = create_view(self.dsp, '+index')
742+ self.assertTrue(view.bugs_answers_usage['uses_bugs'])
743+ self.assertFalse(view.bugs_answers_usage['uses_answers'])
744+ self.assertFalse(view.bugs_answers_usage['uses_both'])
745+ self.assertTrue(view.bugs_answers_usage['uses_either'])
746+
747+ def test_bugs_answers_usage_answers(self):
748+ # The dict values are True for answers and either.
749+ with celebrity_logged_in('admin'):
750+ self.dsp.distribution.answers_usage = ServiceUsage.LAUNCHPAD
751+ view = create_view(self.dsp, '+index')
752+ self.assertFalse(view.bugs_answers_usage['uses_bugs'])
753+ self.assertTrue(view.bugs_answers_usage['uses_answers'])
754+ self.assertFalse(view.bugs_answers_usage['uses_both'])
755+ self.assertIs(True, view.bugs_answers_usage['uses_either'])
756+
757+ def test_bugs_answers_usage_both(self):
758+ # The dict values are all True.
759+ with celebrity_logged_in('admin'):
760+ self.dsp.distribution.official_malone = True
761+ self.dsp.distribution.answers_usage = ServiceUsage.LAUNCHPAD
762+ view = create_view(self.dsp, '+index')
763+ self.assertTrue(view.bugs_answers_usage['uses_bugs'])
764+ self.assertTrue(view.bugs_answers_usage['uses_answers'])
765+ self.assertTrue(view.bugs_answers_usage['uses_both'])
766+ self.assertTrue(view.bugs_answers_usage['uses_either'])
767
768=== modified file 'lib/lp/registry/doc/distribution-sourcepackage.txt'
769--- lib/lp/registry/doc/distribution-sourcepackage.txt 2010-10-18 22:24:59 +0000
770+++ lib/lp/registry/doc/distribution-sourcepackage.txt 2011-03-19 15:06:38 +0000
771@@ -42,7 +42,7 @@
772 pmount
773
774 >>> print dsp.displayname
775- pmount in ubuntu
776+ pmount in Ubuntu
777
778 >>> print dsp.title.encode('ascii', 'ignore')
779 pmount package in Ubuntu
780@@ -54,7 +54,6 @@
781 Aggregate attributes
782 --------------------
783
784- u'pmount in ubuntu'
785 >>> dsp.bugtasks().count()
786 0
787
788
789=== modified file 'lib/lp/registry/doc/sourcepackage.txt'
790--- lib/lp/registry/doc/sourcepackage.txt 2011-02-14 19:14:15 +0000
791+++ lib/lp/registry/doc/sourcepackage.txt 2011-03-19 15:06:38 +0000
792@@ -233,7 +233,7 @@
793 \u201cmozilla-firefox\u201d package in Ubuntu
794
795 >>> print ubuntu_firefox.displayname
796- mozilla-firefox in ubuntu
797+ mozilla-firefox in Ubuntu
798
799 >>> ubuntu_firefox.distribution == ubuntu
800 True
801
802=== modified file 'lib/lp/registry/model/distributionsourcepackage.py'
803--- lib/lp/registry/model/distributionsourcepackage.py 2011-03-08 05:50:48 +0000
804+++ lib/lp/registry/model/distributionsourcepackage.py 2011-03-19 15:06:38 +0000
805@@ -169,7 +169,7 @@
806 def displayname(self):
807 """See `IDistributionSourcePackage`."""
808 return '%s in %s' % (
809- self.sourcepackagename.name, self.distribution.name)
810+ self.sourcepackagename.name, self.distribution.displayname)
811
812 @property
813 def bugtargetdisplayname(self):
814
815=== modified file 'lib/lp/registry/stories/person/xx-person-subscriptions.txt'
816--- lib/lp/registry/stories/person/xx-person-subscriptions.txt 2011-02-21 16:03:38 +0000
817+++ lib/lp/registry/stories/person/xx-person-subscriptions.txt 2011-03-19 15:06:38 +0000
818@@ -175,9 +175,9 @@
819 ... print "%s <%s>" % (
820 ... extract_text(structure_link), structure_link.get("href"))
821 ... print "--> %s" % modify_link.get("href")
822- mozilla-firefox in ubuntu </ubuntu/+source/mozilla-firefox>
823+ mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>
824 --> /ubuntu/+source/mozilla-firefox/+subscribe
825- pmount in ubuntu </ubuntu/+source/pmount>
826+ pmount in Ubuntu </ubuntu/+source/pmount>
827 --> /ubuntu/+source/pmount/+subscribe
828
829 The links to modify subscriptions are only shown when the user has
830@@ -191,8 +191,8 @@
831 ... structure_link = subscription.find("a")
832 ... print "%s <%s>" % (
833 ... extract_text(structure_link), structure_link.get("href"))
834- mozilla-firefox in ubuntu </ubuntu/+source/mozilla-firefox>
835- pmount in ubuntu </ubuntu/+source/pmount>
836+ mozilla-firefox in Ubuntu </ubuntu/+source/mozilla-firefox>
837+ pmount in Ubuntu </ubuntu/+source/pmount>
838
839 The structural subscriptions page links back to the direct
840 subscriptions page.
841@@ -235,9 +235,9 @@
842 >>> admin_browser.open(
843 ... "http://launchpad.dev/people/+me/+structural-subscriptions")
844 >>> show_create_links(admin_browser)
845- mozilla-firefox in ubuntu
846+ mozilla-firefox in Ubuntu
847 * Create a new filter --> /ubuntu/.../name16/+new-filter
848- pmount in ubuntu
849+ pmount in Ubuntu
850 * Create a new filter --> /ubuntu/.../name16/+new-filter
851
852 If the user does not have the necessary rights to create new bug
853@@ -246,9 +246,9 @@
854 >>> subscriber_browser.open(
855 ... "http://launchpad.dev/~name16/+structural-subscriptions")
856 >>> show_create_links(subscriber_browser)
857- mozilla-firefox in ubuntu
858+ mozilla-firefox in Ubuntu
859 * No create link.
860- pmount in ubuntu
861+ pmount in Ubuntu
862 * No create link.
863
864
865
866=== modified file 'lib/lp/registry/stories/product/xx-product-index.txt'
867--- lib/lp/registry/stories/product/xx-product-index.txt 2010-11-10 22:05:11 +0000
868+++ lib/lp/registry/stories/product/xx-product-index.txt 2011-03-19 15:06:38 +0000
869@@ -380,4 +380,4 @@
870 ... name='field.distributionsourcepackage').value = ['pmount']
871 >>> user_browser.getControl('Set Ubuntu Package Information').click()
872 >>> print_feedback_messages(user_browser.contents)
873- This project was linked to the source package "pmount in ubuntu"
874+ This project was linked to the source package "pmount in Ubuntu"
875
876=== modified file 'lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt'
877--- lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt 2011-01-17 20:58:07 +0000
878+++ lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt 2011-03-19 15:06:38 +0000
879@@ -54,7 +54,9 @@
880 >>> sample_browser.getControl('Branch').value = '~name12/firefox/main'
881 >>> sample_browser.getControl('Update').click()
882
883-Updating the branch takes the user back to the product series page.
884+Updating the branch takes Sample Person back to the product series page,
885+where he can see the link to the branch and a link to see the content
886+of the branch
887
888 >>> print sample_browser.title
889 Series trunk : Mozilla Firefox
890@@ -63,6 +65,9 @@
891 lp://dev/firefox - Sample Person
892 Change branch
893
894+ >>> print sample_browser.getLink('View the branch content').url
895+ http://bazaar.launchpad.dev/~name12/firefox/main/files
896+
897 The total and recent revision counts for the branch are displayed to
898 give an idea of overall and recent activity on the project.
899
900
901=== modified file 'lib/lp/registry/stories/webservice/xx-distribution-source-package.txt'
902--- lib/lp/registry/stories/webservice/xx-distribution-source-package.txt 2011-01-26 19:35:17 +0000
903+++ lib/lp/registry/stories/webservice/xx-distribution-source-package.txt 2011-03-19 15:06:38 +0000
904@@ -11,7 +11,7 @@
905 >>> print pretty(mozilla_firefox)
906 {u'bug_reported_acknowledgement': None,
907 u'bug_reporting_guidelines': None,
908- u'display_name': u'mozilla-firefox in debian',
909+ u'display_name': u'mozilla-firefox in Debian',
910 u'distribution_link': u'http://.../debian',
911 u'http_etag': u'...',
912 u'name': u'mozilla-firefox',
913
914=== modified file 'lib/lp/registry/templates/distributionsourcepackage-index.pt'
915--- lib/lp/registry/templates/distributionsourcepackage-index.pt 2011-03-04 00:08:20 +0000
916+++ lib/lp/registry/templates/distributionsourcepackage-index.pt 2011-03-19 15:06:38 +0000
917@@ -34,18 +34,19 @@
918 <div id="summary"
919 tal:content="structure context/summary/fmt:text-to-html" />
920
921- <p>
922+ <p tal:condition="view/bugs_answers_usage/uses_either">
923 This package has
924- <a tal:attributes="href view/menu:overview/new_bugs/url">
925- <strong>
926- <tal:newbugs content="newbugs"/> new bug<tal:plural content="string:s" condition="python: newbugs!=1"/>
927- </strong>
928+ <a tal:attributes="href view/menu:overview/new_bugs/url"
929+ tal:condition="view/bugs_answers_usage/uses_bugs"
930+ ><tal:newbugs content="newbugs"/> new
931+ bug<tal:plural content="string:s" condition="python: newbugs!=1"/>
932 </a>
933- and
934- <a tal:attributes="href view/menu:overview/open_questions/url">
935- <strong>
936- <tal:openq content="open_questions"/> open question<tal:plural content="string:s" condition="python: open_questions!=1"/>.
937- </strong>
938+ <tal:both condition="view/bugs_answers_usage/uses_both">and</tal:both>
939+ <a tal:attributes="href view/menu:overview/open_questions/url"
940+ tal:condition="view/bugs_answers_usage/uses_answers"
941+ ><tal:openq content="open_questions"/> open
942+ question<tal:plural content="string:s"
943+ condition="python: open_questions!=1"/>.
944 </a>
945 </p>
946 </div>
947
948=== modified file 'lib/lp/registry/templates/productseries-index.pt'
949--- lib/lp/registry/templates/productseries-index.pt 2010-10-10 21:54:16 +0000
950+++ lib/lp/registry/templates/productseries-index.pt 2011-03-19 15:06:38 +0000
951@@ -110,6 +110,10 @@
952
953 <div class="yui-u">
954 <div tal:replace="structure context/@@+code-summary" />
955+
956+ <p tal:condition="context/branch/required:launchpad.View|nothing">
957+ <a tal:replace="structure context/branch/menu:context/source/fmt:link"/>
958+ </p>
959 </div>
960 </div>
961
962
963=== modified file 'lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt'
964--- lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2011-02-03 03:49:36 +0000
965+++ lib/lp/soyuz/doc/distroarchseriesbinarypackage.txt 2011-03-19 15:06:38 +0000
966@@ -147,7 +147,7 @@
967
968 >>> distro_source_package = firefox_hoary_i386.distro_source_package
969 >>> distro_source_package.displayname
970- u'mozilla-firefox in ubuntu'
971+ u'mozilla-firefox in Ubuntu'
972
973 If a given binary package doesn't have a current release, then the
974 distro_source_package attribute should return None.
975
976=== modified file 'lib/lp/soyuz/doc/sourcepackagerelease.txt'
977--- lib/lp/soyuz/doc/sourcepackagerelease.txt 2010-11-06 12:45:26 +0000
978+++ lib/lp/soyuz/doc/sourcepackagerelease.txt 2011-03-19 15:06:38 +0000
979@@ -99,7 +99,7 @@
980 >>> print spr.sourcepackage.displayname
981 mozilla-firefox in Ubuntu Warty
982 >>> print spr.distrosourcepackage.displayname
983- mozilla-firefox in ubuntu
984+ mozilla-firefox in Ubuntu
985
986 It should also work when the version has a dash and packaging revision
987 after it:
988
989=== modified file 'lib/lp/translations/stories/standalone/custom-language-codes.txt'
990--- lib/lp/translations/stories/standalone/custom-language-codes.txt 2010-12-23 09:30:22 +0000
991+++ lib/lp/translations/stories/standalone/custom-language-codes.txt 2011-03-19 15:06:38 +0000
992@@ -260,7 +260,7 @@
993
994 >>> tag = find_tag_by_id(translations_browser.contents, 'nonempty')
995 >>> print extract_text(tag.renderContents())
996- bar in distro uses the following custom language codes:
997+ bar in Distro uses the following custom language codes:
998 Code... ...maps to language
999 pt-br Portuguese (Brazil)
1000
1001@@ -277,7 +277,7 @@
1002 >>> translations_browser.getLink("define custom language codes").click()
1003 >>> tag = find_tag_by_id(translations_browser.contents, 'nonempty')
1004 >>> print extract_text(tag.renderContents())
1005- bar in distro uses the following custom language codes:
1006+ bar in Distro uses the following custom language codes:
1007 Code... ...maps to language
1008 pt-br Portuguese (Brazil)
1009