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

Proposed by Jamal Fanaian
Status: Merged
Approved by: Henning Eggers
Approved revision: not available
Merged at revision: not available
Proposed branch: lp://staging/~jamalta/launchpad/changesfile-253525
Merge into: lp://staging/launchpad
Diff against target: 229 lines (+27/-46)
7 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-files.txt (+1/-1)
lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt (+3/-3)
lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt (+12/-31)
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
Jamal Fanaian (community) Approve
Henning Eggers (community) code Approve
Review via email: mp+17596@code.staging.launchpad.net

This proposal supersedes a proposal from 2010-01-18.

Commit message

Renamed "changesfile" throughout various pages in soyuz to "sources.changes" since it is not a word. Updated tests that referenced the term "changesfile".

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

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 : Posted in a previous version of this proposal

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)
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
Jamal Fanaian (jamalta) wrote :

=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt'
--- lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2010-01-18 16:42:09 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2010-01-18 17:02:54 +0000
@@ -243,11 +243,8 @@
   >>> user_browser.open(
   ... "http://launchpad.dev/ubuntu/breezy-autotest/+source/"
   ... "commercialpackage/1.0-1")
- >>> changelog = find_tag_by_id(
- ... user_browser.contents, 'commercialpackage_1.0-1')
- >>> print extract_text(changelog.find('a'))
- <email address hidden>
-
+ >>> print user_browser.getLink('<email address hidden>').url
+ http://launchpad.dev/~name16

 Let's check how the page behaves if we no files are present:

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

Thank you very much for the fix and for taking the time to improve the test as well. BIG BONUS POINTS for that! ;-) Good job!

I will land tha branch for you. Thank you for your contribution-

review: Approve (code)
Revision history for this message
Jamal Fanaian (jamalta) wrote :

Looks like I missed a test. Fixed errors from the test.

=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-files.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2009-11-27 13:09:06 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2010-01-18 21:41:12 +0000
@@ -91,7 +91,7 @@
 Links to files accessible via +files/ proxy in the PPA page.

     >>> ppa_links = [
- ... ('(changesfile)',
+ ... ('(sources.changes)',
     ... another_test_source.sourcepackagerelease.upload_changesfile),
     ... ]

review: Approve

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 21:44:16 +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 21:44:16 +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-files.txt'
75--- lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2009-11-27 13:09:06 +0000
76+++ lib/lp/soyuz/stories/ppa/xx-ppa-files.txt 2010-01-18 21:44:16 +0000
77@@ -91,7 +91,7 @@
78 Links to files accessible via +files/ proxy in the PPA page.
79
80 >>> ppa_links = [
81- ... ('(changesfile)',
82+ ... ('(sources.changes)',
83 ... another_test_source.sourcepackagerelease.upload_changesfile),
84 ... ]
85
86
87=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
88--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-12-14 13:49:03 +0000
89+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2010-01-18 21:44:16 +0000
90@@ -96,7 +96,7 @@
91 Source Published Status Series Section Build
92 Status
93 cdrkit - 1.0 2007-07-09 Published Breezy-a... Editors i386
94- ice...(changesfile) 2007-07-09 Published Warty Editors i386
95+ ice...(sources.changes) 2007-07-09 Published Warty Editors i386
96 pmount - 0.1-1 2007-07-09 Published Warty Editors
97
98 Each data row is expandable to contain some sections containing:
99@@ -289,7 +289,7 @@
100 >>> print_archive_package_rows(anon_browser.contents)
101 Source Published Status Series Section Build
102 Status
103- i...(changesfile) 2007-07-09 Superseded Warty Editors
104+ i...(sources.changes) 2007-07-09 Superseded Warty Editors
105 pmount - 0.1-1 2007-07-09 Deleted Warty Editors
106
107 The 'Any Status' filter is also available, so the user can search over
108@@ -301,7 +301,7 @@
109 Source Published Status Series Section Build
110 Status
111 cdrkit - 1.0 2007-07-09 Published Breezy-a... Editors i386
112- ic...(changesfile) 2007-07-09 Superseded Warty Editors
113+ ic...(sources.changes) 2007-07-09 Superseded Warty Editors
114 pmount - 0.1-1 2007-07-09 Deleted Warty Editors
115
116
117
118=== modified file 'lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt'
119--- lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2009-11-18 02:58:23 +0000
120+++ lib/lp/soyuz/stories/soyuz/xx-distroseries-sources.txt 2010-01-18 21:44:16 +0000
121@@ -212,14 +212,8 @@
122
123 With the possibility to download the entire changesfile (if available):
124
125- >>> print find_tag_by_id(browser.contents, 'changesfile')
126- <div id="changesfile">
127- <p>
128- <a href="http://localhost:58000/52/mozilla-firefox_0.9_i386.changes">
129- View changesfile
130- </a>
131- </p>
132- </div>
133+ >>> print extract_text(find_tag_by_id(browser.contents, 'changesfile'))
134+ View sources.changes
135
136 And also download the files contained in this source, like '.orig',
137 '.diff' and the DSC:
138@@ -249,11 +243,8 @@
139 >>> user_browser.open(
140 ... "http://launchpad.dev/ubuntu/breezy-autotest/+source/"
141 ... "commercialpackage/1.0-1")
142- >>> changelog = find_tag_by_id(
143- ... user_browser.contents, 'commercialpackage_1.0-1')
144- >>> changelog.find('a')
145- <a href="http://launchpad.dev/~name16" class="sprite person">&nbsp;foo.bar@canonical.com</a>
146-
147+ >>> print user_browser.getLink('foo.bar@canonical.com').url
148+ http://launchpad.dev/~name16
149
150 Let's check how the page behaves if we no files are present:
151
152@@ -264,15 +255,11 @@
153 A string is presented in both 'changesfile' and 'files' sections,
154 warning the user that no file is available:
155
156- >>> print find_tag_by_id(browser.contents, 'changesfile')
157- <div id="changesfile">
158- <p>No changesfile available.</p>
159- </div>
160+ >>> print extract_text(find_tag_by_id(browser.contents, 'changesfile'))
161+ No sources.changes available.
162
163- >>> print find_tag_by_id(browser.contents, 'files')
164- <div id="files">
165- <p>No files available for download.</p>
166- </div>
167+ >>> print extract_text(find_tag_by_id(browser.contents, 'files'))
168+ No files available for download.
169
170
171 = DistroSeries Partner Source Package Pages =
172@@ -291,11 +278,8 @@
173 This page provides its versions publications organised by pocket.
174 We can see 'commercialpackage' is published once in pocket RELEASE:
175
176- >>> print find_tag_by_id(browser.contents, 'publishing_history')
177- <dl id="publishing_history">
178- ...
179- <a href="/ubuntu/breezy-autotest/+source/commercialpackage/1.0-1">commercialpackage 1.0-1</a>
180- ...
181+ >>> print browser.getLink('commercialpackage 1.0-1').url
182+ http://launchpad.dev/ubuntu/breezy-autotest/+source/commercialpackage/1.0-1
183
184 The user can also download the files for the "currentrelease" (last
185 published version) if they are available:
186@@ -372,11 +356,8 @@
187
188 With the possibility to download the entire changesfile (if available):
189
190- >>> print find_tag_by_id(browser.contents, 'changesfile')
191- <div id="changesfile">
192- ...
193- <a href="http://localhost:58000/65/commercialpackage_1.0-1_source.changes">
194- ...
195+ >>> print browser.getLink('View sources.changes').url
196+ http://localhost:58000/65/commercialpackage_1.0-1_source.changes
197
198 And also download the files contained in this source, like '.orig',
199 '.diff' and the DSC:
200
201=== modified file 'lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt'
202--- lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt 2009-10-27 03:23:05 +0000
203+++ lib/lp/soyuz/templates/distroseriessourcepackagerelease-index.pt 2010-01-18 21:44:16 +0000
204@@ -50,10 +50,10 @@
205 <div id="changesfile" tal:define="changesfile context/changesfile">
206 <p tal:condition="changesfile">
207 <a tal:attributes="href changesfile/http_url">
208- View changesfile
209+ View sources.changes
210 </a>
211 </p>
212- <p tal:condition="not: changesfile">No changesfile available.</p>
213+ <p tal:condition="not: changesfile">No sources.changes available.</p>
214 </div>
215
216 </div>
217
218=== modified file 'lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt'
219--- lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2009-12-10 15:19:03 +0000
220+++ lib/lp/soyuz/templates/sourcepackagepublishinghistory-listing-archive-detailed.pt 2010-01-18 21:44:16 +0000
221@@ -35,7 +35,7 @@
222 <a tal:condition="changesfile"
223 tal:attributes="href changesfile/http_url;
224 title changesfile/filename"
225- >(changesfile)</a>
226+ >(sources.changes)</a>
227 </tal:view_changesfile>
228 </td>
229 <td tal:condition="context/archive/owner/isTeam"