Merge lp://staging/~jamalta/launchpad/changesfile-253525 into lp://staging/launchpad

Proposed by Jamal Fanaian
Status: Superseded
Proposed branch: lp://staging/~jamalta/launchpad/changesfile-253525
Merge into: lp://staging/launchpad
Diff against target: 213 lines (+26/-42)
6 files modified
lib/lp/soyuz/stories/ppa/xx-copy-packages.txt (+4/-4)
lib/lp/soyuz/stories/ppa/xx-delete-packages.txt (+4/-4)
lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt (+3/-3)
lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt (+12/-28)
lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt (+2/-2)
lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt (+1/-1)
To merge this branch: bzr merge lp://staging/~jamalta/launchpad/changesfile-253525
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Needs Fixing
Review via email: mp+17587@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2010-01-18.

To post a comment you must log in.
Revision history for this message
Jamal Fanaian (jamalta) wrote :

Summary

Bug #253525 explains that the word changesfile does not exist and should be changed for something that makes sense. The PPA page was changed to read sources.changes, so the same example was followed in the other templates that still read changesfile.

Proposed fix

Replace changesfile in templates so that it reads sources.changes instead.

Pre-implementation notes

Discussed with Curtis Hovey who agreed that sources.changes was the best term to use. He also pointed out stories for soyuz that will have to be modified to work with this change.

Implementation details

lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt
lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt
 * Changes changesfile term in the content to sources.changes

lib/lp/soyuz/stories/ppa/xx-copy-packages.txt
lib/lp/soyuz/stories/ppa/xx-delete-packages.txt
lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt
lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt
 * Update stories that referenced pages with the above templates to read sources.changes instead of changesfile.

Tests

bin/test -vvct xx-distroseries-sources
bin/test -vvct xx-copy-packages
bin/test -vvct xx-delete-packages
bin/test -vvct xx-ppa-packages

Demo and Q/A

https://launchpad.dev/~cprov/+archive/ppa/+packages
https://launchpad.dev/ubuntu/hoary/+source/pmount/0.1-1

Revision history for this message
Henning Eggers (henninge) wrote :

As discussed on irc, please apply extract_text to the tests in xx-distroseries-sources.txt to remove the HTML from the text. Find all occurances in that file for bonus points.

Come back with an incremental diff for approval, please.

review: Needs Fixing (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/soyuz/stories/ppa/xx-copy-packages.txt'
2--- lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2009-12-11 15:57:14 +0000
3+++ lib/lp/soyuz/stories/ppa/xx-copy-packages.txt 2010-01-18 16:45:25 +0000
4@@ -988,7 +988,7 @@
5 >>> print_ppa_packages(jblack_browser.contents)
6 Source Published Status Series Section Build
7 Status
8- foo - 2.0 (changesfile) ... Published Hoary Base
9+ foo - 2.0 (sources.changes) ... Published Hoary Base
10
11 >>> foo_pub_id = getPPAPubIDsFor('no-priv', 'foo')[0]
12 >>> jblack_browser.getControl(
13@@ -1063,8 +1063,8 @@
14 >>> print_ppa_packages(jblack_browser.contents)
15 Source Published Status Series Section Build
16 Status
17- foo - 2.0 (changesfile) Pending Hoary Base i386
18- foo - 1.1 (changesfile) Pending Warty Base
19+ foo - 2.0 (sources.changes) Pending Hoary Base i386
20+ foo - 1.1 (sources.changes) Pending Warty Base
21 pmount - 0.1-1 (Newer...) Pending Hoary Editors
22 pmount - 0.1-1 Pending Warty Editors
23 pmount - 0.1-1 Pending Grumpy Editors
24@@ -1080,7 +1080,7 @@
25 >>> print_ppa_packages(jblack_browser.contents)
26 Source Published Status Series Section Build
27 Status
28- foo - 1.1 (changesfile) ... Published Hoary Base
29+ foo - 1.1 (sources.changes) ... Published Hoary Base
30 iceweasel...(...) 2007-07-09 Published Breezy-autotest Editors
31
32 >>> foo_pub_id = getPPAPubIDsFor('mark', 'foo')[0]
33
34=== modified file 'lib/lp/soyuz/stories/ppa/xx-delete-packages.txt'
35--- lib/lp/soyuz/stories/ppa/xx-delete-packages.txt 2009-09-22 16:39:28 +0000
36+++ lib/lp/soyuz/stories/ppa/xx-delete-packages.txt 2010-01-18 16:45:25 +0000
37@@ -371,7 +371,7 @@
38 >>> print_ppa_packages(user_browser.contents)
39 Source Published Status Series Section Build
40 Status
41- foo - 1.0 (changesfile) Superseded Hoary Base
42+ foo - 1.0 (sources.changes) Superseded Hoary Base
43
44 We don't show the publishing details for binary packages, but the
45 presence of 'Built packages' and the binary filename in the 'Files'
46@@ -401,7 +401,7 @@
47 >>> print_ppa_packages(user_browser.contents)
48 Source Published Status Series Section Build
49 Status
50- foo - 1.0 (changesfile) Superseded Hoary Base
51+ foo - 1.0 (sources.changes) Superseded Hoary Base
52
53 >>> expander_url = user_browser.getLink(
54 ... id='pub%s-expander' % foo_pub_src.id).url
55@@ -440,7 +440,7 @@
56 >>> print_ppa_packages(user_browser.contents)
57 Source Published Status Series Section Build
58 Status
59- foo - 1.0 (changesfile) Superseded Hoary Base
60+ foo - 1.0 (sources.changes) Superseded Hoary Base
61
62 The deletion works exactly as it does for PUBLISHED sources, both,
63 source and binaries are marked as DELETED and the corresponding
64@@ -479,7 +479,7 @@
65 >>> print_ppa_packages(user_browser.contents)
66 Source Published Status Series Section Build
67 Status
68- foo - 1.0 (changesfile) Deleted Hoary Base
69+ foo - 1.0 (sources.changes) Deleted Hoary Base
70
71 >>> expander_url = user_browser.getLink(
72 ... id='pub%s-expander' % foo_pub_src.id).url
73
74=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
75--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-12-14 13:49:03 +0000
76+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-01-18 16:45:25 +0000
77@@ -96,7 +96,7 @@
78 Source Published Status Series Section Build
79 Status
80 cdrkit - 1.0 2007-07-09 Published Breezy-a... Editors i386
81- ice...(changesfile) 2007-07-09 Published Warty Editors i386
82+ ice...(sources.changes) 2007-07-09 Published Warty Editors i386
83 pmount - 0.1-1 2007-07-09 Published Warty Editors
84
85 Each data row is expandable to contain some sections containing:
86@@ -289,7 +289,7 @@
87 >>> print_archive_package_rows(anon_browser.contents)
88 Source Published Status Series Section Build
89 Status
90- i...(changesfile) 2007-07-09 Superseded Warty Editors
91+ i...(sources.changes) 2007-07-09 Superseded Warty Editors
92 pmount - 0.1-1 2007-07-09 Deleted Warty Editors
93
94 The 'Any Status' filter is also available, so the user can search over
95@@ -301,7 +301,7 @@
96 Source Published Status Series Section Build
97 Status
98 cdrkit - 1.0 2007-07-09 Published Breezy-a... Editors i386
99- ic...(changesfile) 2007-07-09 Superseded Warty Editors
100+ ic...(sources.changes) 2007-07-09 Superseded Warty Editors
101 pmount - 0.1-1 2007-07-09 Deleted Warty Editors
102
103
104
105=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt'
106--- lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2009-11-18 02:58:23 +0000
107+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2010-01-18 16:45:25 +0000
108@@ -212,14 +212,8 @@
109
110 With the possibility to download the entire changesfile (if available):
111
112- >>> print find_tag_by_id(browser.contents, 'changesfile')
113- <div id="changesfile">
114- <p>
115- <a href="http://localhost:58000/52/mozilla-firefox_0.9_i386.changes">
116- View changesfile
117- </a>
118- </p>
119- </div>
120+ >>> print extract_text(find_tag_by_id(browser.contents, 'changesfile'))
121+ View sources.changes
122
123 And also download the files contained in this source, like '.orig',
124 '.diff' and the DSC:
125@@ -251,8 +245,8 @@
126 ... "commercialpackage/1.0-1")
127 >>> changelog = find_tag_by_id(
128 ... user_browser.contents, 'commercialpackage_1.0-1')
129- >>> changelog.find('a')
130- <a href="http://launchpad.dev/~name16" class="sprite person">&nbsp;foo.bar@canonical.com</a>
131+ >>> print extract_text(changelog.find('a'))
132+ foo.bar@canonical.com
133
134
135 Let's check how the page behaves if we no files are present:
136@@ -264,15 +258,11 @@
137 A string is presented in both 'changesfile' and 'files' sections,
138 warning the user that no file is available:
139
140- >>> print find_tag_by_id(browser.contents, 'changesfile')
141- <div id="changesfile">
142- <p>No changesfile available.</p>
143- </div>
144+ >>> print extract_text(find_tag_by_id(browser.contents, 'changesfile'))
145+ No sources.changes available.
146
147- >>> print find_tag_by_id(browser.contents, 'files')
148- <div id="files">
149- <p>No files available for download.</p>
150- </div>
151+ >>> print extract_text(find_tag_by_id(browser.contents, 'files'))
152+ No files available for download.
153
154
155 = DistroSeries Partner Source Package Pages =
156@@ -291,11 +281,8 @@
157 This page provides its versions publications organised by pocket.
158 We can see 'commercialpackage' is published once in pocket RELEASE:
159
160- >>> print find_tag_by_id(browser.contents, 'publishing_history')
161- <dl id="publishing_history">
162- ...
163- <a href="/ubuntu/breezy-autotest/+source/commercialpackage/1.0-1">commercialpackage 1.0-1</a>
164- ...
165+ >>> print browser.getLink('commercialpackage 1.0-1').url
166+ http://launchpad.dev/ubuntu/breezy-autotest/+source/commercialpackage/1.0-1
167
168 The user can also download the files for the "currentrelease" (last
169 published version) if they are available:
170@@ -372,11 +359,8 @@
171
172 With the possibility to download the entire changesfile (if available):
173
174- >>> print find_tag_by_id(browser.contents, 'changesfile')
175- <div id="changesfile">
176- ...
177- <a href="http://localhost:58000/65/commercialpackage_1.0-1_source.changes">
178- ...
179+ >>> print browser.getLink('View sources.changes').url
180+ http://localhost:58000/65/commercialpackage_1.0-1_source.changes
181
182 And also download the files contained in this source, like '.orig',
183 '.diff' and the DSC:
184
185=== modified file 'lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt'
186--- lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt 2009-10-27 03:23:05 +0000
187+++ lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt 2010-01-18 16:45:25 +0000
188@@ -50,10 +50,10 @@
189 <div id="changesfile" tal:define="changesfile context/changesfile">
190 <p tal:condition="changesfile">
191 <a tal:attributes="href changesfile/http_url">
192- View changesfile
193+ View sources.changes
194 </a>
195 </p>
196- <p tal:condition="not: changesfile">No changesfile available.</p>
197+ <p tal:condition="not: changesfile">No sources.changes available.</p>
198 </div>
199
200 </div>
201
202=== modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt'
203--- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-12-10 15:19:03 +0000
204+++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2010-01-18 16:45:25 +0000
205@@ -35,7 +35,7 @@
206 <a tal:condition="changesfile"
207 tal:attributes="href changesfile/http_url;
208 title changesfile/filename"
209- >(changesfile)</a>
210+ >(sources.changes)</a>
211 </tal:view_changesfile>
212 </td>
213 <td tal:condition="context/archive/owner/isTeam"