Merge lp:~jtv/launchpad/db-bug-788526 into lp:launchpad/db-devel
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jeroen T. Vermeulen | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 10610 | ||||
Proposed branch: | lp:~jtv/launchpad/db-bug-788526 | ||||
Merge into: | lp:launchpad/db-devel | ||||
Diff against target: |
455 lines (+233/-31) 6 files modified
lib/lp/registry/browser/distroseries.py (+52/-17) lib/lp/registry/browser/tests/test_distroseries.py (+69/-0) lib/lp/registry/templates/distroseries-localdifferences.pt (+6/-5) lib/lp/soyuz/interfaces/distributionjob.py (+11/-0) lib/lp/soyuz/model/distroseriesdifferencejob.py (+27/-1) lib/lp/soyuz/tests/test_distroseriesdifferencejob.py (+68/-8) |
||||
To merge this branch: | bzr merge lp:~jtv/launchpad/db-bug-788526 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+62623@code.launchpad.net |
Commit message
[r=adeuring] Show updating as well as synchronizing DSDs in the UI.
Description of the change
= Summary =
When a DistroSeriesDif
We want that for pending DSD updates as well.
== Proposed fix ==
Very similar to what we already do for the package-copy jobs (the package syncs): add a "find jobs relevant to these DSDs" method to the job source. Call it once from a cachedproperty on the view, for the entire batch. Have a simple lookup method on the view to see whether a given DSD has jobs pending.
This was also a nice opportunity to decisions from TAL to the view class. I added a view method that computes the new string (and note that a DSD may be syncing and updating at the same time).
== Pre-implementation notes ==
Discussed with Julian. Note that a pending DSD update should not stop the user from requesting a sync for that DSD. In that respect this change differs from the one for pending syncs.
== Implementation details ==
I cleaned up some "if/elif/elif" code in cached_differences, replacing it with a dict. One of the items in the code was a bit irregular (a mono-tuple instead of an item, which in this case looks like it does the same thing) but I was too lazy to check whether that could be cleaned up as well. I left it in.
The set_derived_
In lib/lp/
Something I kept running into is that DistroSeriesDif
== Tests ==
{{{
./bin/test -vvc lp.registry.
./bin/test -vvc lp.soyuz.
}}}
== Demo and Q/A ==
Look at a DSDs page such as https:/
Requesting asynchronous package syncs for DSDs should cause them to be marked as "synchronizing..."
Updating a package and reloading +localpackagediffs should cause the corresponding DSD to be marked as "updating..."
The two messages may also combine.
= Launchpad lint =
I added no lint and I fixed some pre-existing lint, but left some in place as well:
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
259: E261 at least two spaces before inline comment
283: E261 at least two spaces before inline comment
399: E261 at least two spaces before inline comment
417: E261 at least two spaces before inline comment
423: E261 at least two spaces before inline comment