Merge lp:~nacc/launchpad/document-getpublishedsources-sort into lp:launchpad

Proposed by Nish Aravamudan on 2017-06-22
Status: Merged
Merged at revision: 18417
Proposed branch: lp:~nacc/launchpad/document-getpublishedsources-sort
Merge into: lp:launchpad
Diff against target: 25 lines (+7/-1)
1 file modified
lib/lp/soyuz/interfaces/archive.py (+7/-1)
To merge this branch: bzr merge lp:~nacc/launchpad/document-getpublishedsources-sort
Reviewer Review Type Date Requested Status
Colin Watson 2017-06-22 Approve on 2017-06-22
Review via email: mp+326177@code.launchpad.net

Commit Message

Document the implicit sort of Archive.getPublishedSources so it does not accidentally change in the future.

Description of the Change

As discussed on IRC with cjwatson, document the implicit sort of getPublishedSources so it does not accidentally change in the future.

To post a comment you must log in.
Colin Watson (cjwatson) :
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/interfaces/archive.py'
2--- lib/lp/soyuz/interfaces/archive.py 2017-04-25 11:35:03 +0000
3+++ lib/lp/soyuz/interfaces/archive.py 2017-06-22 19:15:41 +0000
4@@ -502,7 +502,10 @@
5 title=_("Order by creation date"),
6 description=_("Return newest results first. This is recommended "
7 "for applications that need to catch up with "
8- "publications since their last run."),
9+ "publications since their last run. If not "
10+ "specified, results are ordered by source "
11+ "package name (lexicographically), then by "
12+ "descending version and then descending ID.",
13 required=False),
14 )
15 # Really returns ISourcePackagePublishingHistory, see below for
16@@ -541,6 +544,9 @@
17 :param order_by_date: Order publications by descending creation date
18 and then by descending ID. This is suitable for applications
19 that need to catch up with publications since their last run.
20+ If not specified, publications are ordered by source
21+ package name (lexicographically), then by descending version
22+ and then descending ID.
23
24 :return: SelectResults containing `ISourcePackagePublishingHistory`,
25 ordered by name. If there are multiple results for the same