Merge lp:~thumper/launchpad/fix-deletion-syncUpdate into lp:launchpad
Status: | Merged | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Approved by: | Tim Penhey | ||||||||||||
Approved revision: | no longer in the source branch. | ||||||||||||
Merged at revision: | 11335 | ||||||||||||
Proposed branch: | lp:~thumper/launchpad/fix-deletion-syncUpdate | ||||||||||||
Merge into: | lp:launchpad | ||||||||||||
Diff against target: |
105 lines (+16/-17) 2 files modified
lib/lp/code/model/branch.py (+3/-5) lib/lp/code/model/tests/test_branch.py (+13/-12) |
||||||||||||
To merge this branch: | bzr merge lp:~thumper/launchpad/fix-deletion-syncUpdate | ||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jonathan Lange (community) | Approve | ||
Review via email: mp+32410@code.launchpad.net |
Commit message
Fix deletion of branches linked as translations_
Description of the change
This branch fixes a bug stopping branches that have been linked to product series as translations branches from being deleted.
The guts of the issue was the code that cleared the translations_branch attribute of the product series didn't work - because it was clearing the "branch" attribute, not the "translations_
I added the test, and also fixed up the model class to only flush to the DB once at the end
of the _breakReference() call.
As part of the cleanup, I also moved the Store.flush() call into a test cleanup method that gets run for every test, and removed the use of sample data.
tests:
TestBranchDel
On Thu, Aug 12, 2010 at 3:06 AM, Tim Penhey <email address hidden> wrote: reviewers) /bugs.launchpad .net/bugs/ 599259 branch" . A case here of missing tests.
> Tim Penhey has proposed merging lp:~thumper/launchpad/fix-deletion-syncUpdate into lp:launchpad/devel.
>
> Requested reviews:
> Launchpad code reviewers (launchpad-
> Related bugs:
> #599259 ForbiddenAttribute: syncUpdate
> https:/
>
>
> This branch fixes a bug stopping branches that have been linked to product series as translations branches from being deleted.
>
> The guts of the issue was the code that cleared the translations_branch attribute of the product series didn't work - because it was clearing the "branch" attribute, not the "translations_
>
> I added the test, and also fixed up the model class to only flush to the DB once at the end
> of the _breakReference() call.
>
> As part of the cleanup, I also moved the Store.flush() call into a test cleanup method that gets run for every test, and removed the use of sample data.
>
Thanks Tim.
Can you please define a constant in lp.testing. sampledata for loginAsAnyone( ) or one of the login helpers.
'<email address hidden>' and use that in the tests? Alternatively, use
self.factory.
Other than that, look good.
cheers,
jml