Merge lp:~abentley/launchpad/resubmit-change-branch into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Aaron Bentley | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 11904 | ||||
Proposed branch: | lp:~abentley/launchpad/resubmit-change-branch | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
407 lines (+218/-31) 6 files modified
lib/lp/code/browser/branchmergeproposal.py (+37/-5) lib/lp/code/browser/tests/test_branchmergeproposal.py (+94/-1) lib/lp/code/interfaces/branchmergeproposal.py (+25/-11) lib/lp/code/model/branchmergeproposal.py (+20/-8) lib/lp/code/model/tests/test_branchmergeproposal.py (+38/-0) lib/lp/code/templates/branchmergeproposal-resubmit.pt (+4/-6) |
||||
To merge this branch: | bzr merge lp:~abentley/launchpad/resubmit-change-branch | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Hummer (community) | ui | Approve | |
Brad Crittenden (community) | code | Approve | |
Review via email: mp+40126@code.launchpad.net |
Commit message
Allow changing branches, description when resubmitting merge proposal.
Description of the change
= Summary =
Fix bug #504369: Resubmit should allow changing the branches
Screenshot: http://
== Proposed fix ==
Add fields for the branches to the resubmit page. Also allow changing the
description. Also allow the user to break the link between the old and new
proposals.
== Pre-implementation notes ==
None
== Implementation details ==
Changed the schema to ResubmitSchema to add the break_link boolean.
Changed from MergeProposalEd
adapt BranchMergeProposal to ResubmitSchema.
Changed the text to reflect the fact that users now control the branches.
Changed the text to refer to the current merge proposal as "this proposal",
since the new one doesn't exist yet.
== Tests ==
bin/test -vt proposal code
== Demo and Q/A ==
Create a merge proposal. Resubmit it, changing all branches, description, and
selecting "break link". A new proposal should be created with the specified
branches and description, and with no link to the previous one. The previous
one should be marked "superseded".
= Launchpad lint =
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/
986: E202 whitespace before ']'
988: E301 expected 1 blank line, found 0
Thanks for the very nice cover letter Aaron.
The lint issues both look real and need to be fixed. The list for field_names should be multi-line with one entry per line ending with a trailing comma.
In 'initial_values' the list 'values' is really key, value pairs so calling it 'items' would make more sense.
In 'test_resubmit_ text' your use of string concatenation the call to 'assertTextMatc hes...' is hard to read. Using a variable like
expected = '...'
would be more readable.
s/If this is the same as the target branch/
If this branch is the same as the target branch
Please provide a 'cancel_url' so that you get a cancel link.
Finally, it is clear you thought it out since you test for it explicitly, but I question the need to create a new merge proposal when nothing has changed. Do you have a good use case for that?
This new functionality is a vast improvement. Thanks for recognizing the need and providing the solution.