Merge lp:~sinzui/launchpad/person-merge-job-0 into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 12622 | ||||
Proposed branch: | lp:~sinzui/launchpad/person-merge-job-0 | ||||
Merge into: | lp:launchpad | ||||
Diff against target: | 0 lines | ||||
To merge this branch: | bzr merge lp:~sinzui/launchpad/person-merge-job-0 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
j.c.sackett (community) | Approve | ||
Review via email: mp+53706@code.launchpad.net |
Description of the change
Add sanity checks to mergeAsync.
Launchpad bug: https:/
Pre-
Test command: ./bin/test -vv \
-t webservice/
-t TestPersonMergeJob
This issue is a continuation of bug 162510. The infrastructure is in place to
merge people an team async.
- Export is_merge_pending to the API.
- No check is performed to see if either merge user is already the
subject of a scheduled merge job.
-------
RULES
* Export is_merge_pending()
* Add a guard to mergeAsync() to ensure a merge is not already scheduled.
* Use is_merge_pending()
* revise is_merge_pending() to check *both* 'from' and 'to' because
users can be working with several merges.
* ADDENDUM: The test setup is incorrect. Fixing it reveals that DB
permissions are wrong.
QA
* Verify that is_merge_pending is exported:
lp = Launchpad.
sinzui = lp.people['sinzui']
print sinzui.
LINT
database/
lib/
lib/
lib/
lib/
lib/
lib/
lib/
IMPLEMENTATION
Exported is_merge_pending() and updated the docstring to apply to both
profiles.
lp/
lp/
Updated is_merge_pending() to meet the needs of the UI and added a guard to
mergeAsync(). Updated the tests and the DB permissions to ensure merge works
for teams and users.
database/
lp/
lib/
lib/
lib/
lib/
lib/
This looks good to land, and a good improvement to the async system.