Merge lp://staging/~rockstar/launchpad/recipe-oopses into lp://staging/launchpad

Proposed by Paul Hummer
Status: Merged
Merged at revision: 10997
Proposed branch: lp://staging/~rockstar/launchpad/recipe-oopses
Merge into: lp://staging/launchpad
Diff against target: 312 lines (+111/-46)
7 files modified
lib/lp/code/browser/sourcepackagerecipe.py (+24/-5)
lib/lp/code/browser/tests/test_sourcepackagerecipe.py (+49/-5)
lib/lp/code/errors.py (+32/-0)
lib/lp/code/interfaces/sourcepackagerecipe.py (+0/-31)
lib/lp/code/model/sourcepackagerecipe.py (+2/-1)
lib/lp/code/model/sourcepackagerecipedata.py (+1/-2)
lib/lp/code/model/tests/test_sourcepackagerecipe.py (+3/-2)
To merge this branch: bzr merge lp://staging/~rockstar/launchpad/recipe-oopses
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+27313@code.staging.launchpad.net

Description of the change

This bug fixes bug #586966 - The run command is not allowed in our use of bzr-builder, and so we should catch that case and notify the user that what they're doing just ain't cool.

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

ForbiddenInstruction is being imported from
lp.code.interfaces.sourcepakagerecipe. Can we put that in lp.code.errors
instead?

> except ForbiddenInstruction:
> self.setFieldError(
> 'recipe_text',
> 'The bzr-builder instruction "run" is not permitted here.')

Can we get the instruction out of the forbidden instruction exception? That
makes more sense than hard coding it. This may cause unnecessary confusion if
they have a different forbidden instruction.

Also, you should do the check in the validate method, not in the action.

review: Needs Fixing
Revision history for this message
Tim Penhey (thumper) wrote :

Approved conditional on fixing the formatting on the XXX comments :)

We should have name, date and bug.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.