launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00370
[Merge] lp:~thumper/launchpad/move-branch-errors into lp:launchpad/devel
Tim Penhey has proposed merging lp:~thumper/launchpad/move-branch-errors into lp:launchpad/devel with lp:~thumper/launchpad/move-webapp-errors as a prerequisite.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
The second pre-branch branch that just moves errors from lp.code.interfaces.branch into lp.code.errors.
--
https://code.launchpad.net/~thumper/launchpad/move-branch-errors/+merge/31509
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thumper/launchpad/move-branch-errors into lp:launchpad/devel.
=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py 2010-06-17 01:16:30 +0000
+++ lib/lp/code/browser/branch.py 2010-08-02 03:45:58 +0000
@@ -86,11 +86,11 @@
CodeImportResultStatus, CodeImportReviewStatus, RevisionControlSystems,
UICreatableBranchType)
from lp.code.errors import (
- CodeImportAlreadyRequested, CodeImportAlreadyRunning,
- CodeImportNotInReviewedState, InvalidBranchMergeProposal)
+ BranchCreationForbidden, BranchExists, CodeImportAlreadyRequested,
+ CodeImportAlreadyRunning, CodeImportNotInReviewedState,
+ InvalidBranchMergeProposal)
from lp.code.interfaces.branch import (
- BranchCreationForbidden, BranchExists, IBranch,
- user_has_special_branch_access)
+ IBranch, user_has_special_branch_access)
from lp.code.interfaces.branchmergeproposal import IBranchMergeProposal
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.code.interfaces.branchnamespace import IBranchNamespacePolicy
=== modified file 'lib/lp/code/browser/codeimport.py'
--- lib/lp/code/browser/codeimport.py 2010-08-02 03:45:57 +0000
+++ lib/lp/code/browser/codeimport.py 2010-08-02 03:45:58 +0000
@@ -34,13 +34,14 @@
BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,
CodeImportReviewStatus, CodeReviewNotificationLevel,
RevisionControlSystems)
+from lp.code.errors import BranchExists
from lp.code.interfaces.branchnamespace import (
get_branch_namespace, IBranchNamespacePolicy)
from lp.code.interfaces.codeimport import (
ICodeImport, ICodeImportSet)
from lp.code.interfaces.codeimportmachine import ICodeImportMachineSet
from lp.code.interfaces.branch import (
- BranchExists, IBranch, user_has_special_branch_access)
+ IBranch, user_has_special_branch_access)
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.registry.interfaces.product import IProduct
from canonical.launchpad.webapp import (
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py 2010-07-27 21:14:50 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py 2010-08-02 03:45:58 +0000
@@ -35,8 +35,8 @@
from canonical.launchpad.webapp.breadcrumb import Breadcrumb
from canonical.widgets.itemswidgets import LabeledMultiCheckBoxWidget
from lp.code.errors import (
- BuildAlreadyPending, ForbiddenInstruction, PrivateBranchRecipe)
-from lp.code.interfaces.branch import NoSuchBranch
+ BuildAlreadyPending, ForbiddenInstruction, NoSuchBranch,
+ PrivateBranchRecipe)
from lp.code.interfaces.sourcepackagerecipe import (
ISourcePackageRecipe, ISourcePackageRecipeSource, MINIMAL_RECIPE_TEXT)
from lp.code.interfaces.sourcepackagerecipebuild import (
=== modified file 'lib/lp/code/errors.py'
--- lib/lp/code/errors.py 2010-07-27 20:38:10 +0000
+++ lib/lp/code/errors.py 2010-08-02 03:45:58 +0000
@@ -7,15 +7,26 @@
__all__ = [
'BadBranchMergeProposalSearchContext',
'BadStateTransition',
+ 'BranchCannotBePrivate',
+ 'BranchCannotBePublic',
+ 'BranchCreationException',
+ 'BranchCreationForbidden',
+ 'BranchCreatorNotMemberOfOwnerTeam',
+ 'BranchCreatorNotOwner',
+ 'BranchExists',
+ 'BranchTargetError',
+ 'BranchTypeError',
'BuildAlreadyPending',
'BuildNotAllowedForDistro',
'BranchMergeProposalExists',
+ 'CannotDeleteBranch',
'CodeImportAlreadyRequested',
'CodeImportAlreadyRunning',
'CodeImportNotInReviewedState',
'ClaimReviewFailed',
'ForbiddenInstruction',
'InvalidBranchMergeProposal',
+ 'NoSuchBranch',
'PrivateBranchRecipe',
'ReviewNotPending',
'TooManyBuilds',
@@ -28,6 +39,8 @@
from lazr.restful.declarations import webservice_error
+from lp.app.errors import NameLookupFailed
+
class BadBranchMergeProposalSearchContext(Exception):
"""The context is not valid for a branch merge proposal search."""
@@ -37,6 +50,93 @@
"""The user requested a state transition that is not possible."""
+class BranchCreationException(Exception):
+ """Base class for branch creation exceptions."""
+
+
+class BranchExists(BranchCreationException):
+ """Raised when creating a branch that already exists."""
+
+ webservice_error(400)
+
+ def __init__(self, existing_branch):
+ # XXX: TimPenhey 2009-07-12 bug=405214: This error
+ # message logic is incorrect, but the exact text is being tested
+ # in branch-xmlrpc.txt.
+ params = {'name': existing_branch.name}
+ if existing_branch.product is None:
+ params['maybe_junk'] = 'junk '
+ params['context'] = existing_branch.owner.name
+ else:
+ params['maybe_junk'] = ''
+ params['context'] = '%s in %s' % (
+ existing_branch.owner.name, existing_branch.product.name)
+ message = (
+ 'A %(maybe_junk)sbranch with the name "%(name)s" already exists '
+ 'for %(context)s.' % params)
+ self.existing_branch = existing_branch
+ BranchCreationException.__init__(self, message)
+
+
+class BranchTargetError(Exception):
+ """Raised when there is an error determining a branch target."""
+
+
+class CannotDeleteBranch(Exception):
+ """The branch cannot be deleted at this time."""
+
+
+class BranchCreationForbidden(BranchCreationException):
+ """A Branch visibility policy forbids branch creation.
+
+ The exception is raised if the policy for the product does not allow
+ the creator of the branch to create a branch for that product.
+ """
+
+
+class BranchCreatorNotMemberOfOwnerTeam(BranchCreationException):
+ """Branch creator is not a member of the owner team.
+
+ Raised when a user is attempting to create a branch and set the owner of
+ the branch to a team that they are not a member of.
+ """
+
+ webservice_error(400)
+
+
+class BranchCreatorNotOwner(BranchCreationException):
+ """A user cannot create a branch belonging to another user.
+
+ Raised when a user is attempting to create a branch and set the owner of
+ the branch to another user.
+ """
+
+ webservice_error(400)
+
+
+class BranchTypeError(Exception):
+ """An operation cannot be performed for a particular branch type.
+
+ Some branch operations are only valid for certain types of branches. The
+ BranchTypeError exception is raised if one of these operations is called
+ with a branch of the wrong type.
+ """
+
+
+class BranchCannotBePublic(Exception):
+ """The branch cannot be made public."""
+
+
+class BranchCannotBePrivate(Exception):
+ """The branch cannot be made private."""
+
+
+class NoSuchBranch(NameLookupFailed):
+ """Raised when we try to load a branch that does not exist."""
+
+ _message_prefix = "No such branch"
+
+
class ClaimReviewFailed(Exception):
"""The user cannot claim the pending review."""
=== modified file 'lib/lp/code/interfaces/branch.py'
--- lib/lp/code/interfaces/branch.py 2010-08-02 03:45:57 +0000
+++ lib/lp/code/interfaces/branch.py 2010-08-02 03:45:58 +0000
@@ -10,18 +10,7 @@
__all__ = [
'BRANCH_NAME_VALIDATION_ERROR_MESSAGE',
'branch_name_validator',
- 'BranchCannotBePrivate',
- 'BranchCannotBePublic',
- 'BranchCreationException',
- 'BranchCreationForbidden',
- 'BranchCreationNoTeamOwnedJunkBranches',
- 'BranchCreatorNotMemberOfOwnerTeam',
- 'BranchCreatorNotOwner',
- 'BranchExists',
- 'BranchTargetError',
- 'BranchTypeError',
'BzrIdentityMixin',
- 'CannotDeleteBranch',
'DEFAULT_BRANCH_STATUS_IN_LISTING',
'get_blacklisted_hostnames',
'IBranch',
@@ -31,7 +20,6 @@
'IBranchListingQueryOptimiser',
'IBranchNavigationMenu',
'IBranchSet',
- 'NoSuchBranch',
'user_has_special_branch_access',
]
@@ -49,8 +37,7 @@
export_as_webservice_collection, export_as_webservice_entry,
export_destructor_operation, export_factory_operation,
export_operation_as, export_read_operation, export_write_operation,
- exported, mutator_for, operation_parameters, operation_returns_entry,
- webservice_error)
+ exported, mutator_for, operation_parameters, operation_returns_entry)
from canonical.config import config
@@ -61,7 +48,6 @@
from canonical.launchpad.validators import LaunchpadValidationError
from canonical.launchpad.webapp.interfaces import ITableBatchNavigator
from canonical.launchpad.webapp.menu import structured
-from lp.app.errors import NameLookupFailed
from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
from lp.code.enums import (
BranchLifecycleStatus,
@@ -87,108 +73,6 @@
BranchLifecycleStatus.MATURE)
-class BranchCreationException(Exception):
- """Base class for branch creation exceptions."""
-
-
-class BranchExists(BranchCreationException):
- """Raised when creating a branch that already exists."""
-
- webservice_error(400)
-
- def __init__(self, existing_branch):
- # XXX: TimPenhey 2009-07-12 bug=405214: This error
- # message logic is incorrect, but the exact text is being tested
- # in branch-xmlrpc.txt.
- params = {'name': existing_branch.name}
- if existing_branch.product is None:
- params['maybe_junk'] = 'junk '
- params['context'] = existing_branch.owner.name
- else:
- params['maybe_junk'] = ''
- params['context'] = '%s in %s' % (
- existing_branch.owner.name, existing_branch.product.name)
- message = (
- 'A %(maybe_junk)sbranch with the name "%(name)s" already exists '
- 'for %(context)s.' % params)
- self.existing_branch = existing_branch
- BranchCreationException.__init__(self, message)
-
-
-class BranchTargetError(Exception):
- """Raised when there is an error determining a branch target."""
-
-
-class CannotDeleteBranch(Exception):
- """The branch cannot be deleted at this time."""
-
-
-class BranchCreationForbidden(BranchCreationException):
- """A Branch visibility policy forbids branch creation.
-
- The exception is raised if the policy for the product does not allow
- the creator of the branch to create a branch for that product.
- """
-
-
-class BranchCreatorNotMemberOfOwnerTeam(BranchCreationException):
- """Branch creator is not a member of the owner team.
-
- Raised when a user is attempting to create a branch and set the owner of
- the branch to a team that they are not a member of.
- """
-
- webservice_error(400)
-
-
-class BranchCreationNoTeamOwnedJunkBranches(BranchCreationException):
- """We forbid the creation of team-owned +junk branches.
-
- Raised when a user is attempting to create a team-owned +junk branch.
- """
-
- error_message = (
- "+junk branches are only available for individuals. Please consider "
- "registering a project for collaborating on branches: "
- "https://help.launchpad.net/Projects/Registering")
-
- def __init__(self):
- BranchCreationException.__init__(self, self.error_message)
-
-
-class BranchCreatorNotOwner(BranchCreationException):
- """A user cannot create a branch belonging to another user.
-
- Raised when a user is attempting to create a branch and set the owner of
- the branch to another user.
- """
-
- webservice_error(400)
-
-
-class BranchTypeError(Exception):
- """An operation cannot be performed for a particular branch type.
-
- Some branch operations are only valid for certain types of branches. The
- BranchTypeError exception is raised if one of these operations is called
- with a branch of the wrong type.
- """
-
-
-class BranchCannotBePublic(Exception):
- """The branch cannot be made public."""
-
-
-class BranchCannotBePrivate(Exception):
- """The branch cannot be made private."""
-
-
-class NoSuchBranch(NameLookupFailed):
- """Raised when we try to load a branch that does not exist."""
-
- _message_prefix = "No such branch"
-
-
def get_blacklisted_hostnames():
"""Return a list of hostnames blacklisted for Branch URLs."""
hostnames = config.codehosting.blacklisted_hostnames
=== modified file 'lib/lp/code/interfaces/webservice.py'
--- lib/lp/code/interfaces/webservice.py 2010-06-18 18:22:34 +0000
+++ lib/lp/code/interfaces/webservice.py 2010-08-02 03:45:58 +0000
@@ -6,11 +6,10 @@
# The exceptions are imported so that they can produce the special
# status code defined by webservice_error when they are raised.
from lp.code.errors import (
+ BranchCreatorNotMemberOfOwnerTeam, BranchCreatorNotOwner, BranchExists,
BuildAlreadyPending, BranchMergeProposalExists, CodeImportAlreadyRunning,
CodeImportNotInReviewedState, TooManyBuilds)
-from lp.code.interfaces.branch import (
- IBranch, IBranchSet, BranchCreatorNotMemberOfOwnerTeam,
- BranchCreatorNotOwner, BranchExists)
+from lp.code.interfaces.branch import IBranch, IBranchSet
from lp.code.interfaces.branchmergeproposal import IBranchMergeProposal
from lp.code.interfaces.branchsubscription import IBranchSubscription
from lp.code.interfaces.codeimport import ICodeImport
=== modified file 'lib/lp/code/mail/codehandler.py'
--- lib/lp/code/mail/codehandler.py 2010-07-27 05:30:04 +0000
+++ lib/lp/code/mail/codehandler.py 2010-08-02 03:45:58 +0000
@@ -41,8 +41,8 @@
from lazr.uri import URI
from lp.code.bzr import get_branch_formats
from lp.code.enums import BranchType, CodeReviewVote
-from lp.code.errors import BranchMergeProposalExists, UserNotBranchReviewer
-from lp.code.interfaces.branch import BranchCreationException
+from lp.code.errors import (
+ BranchCreationException, BranchMergeProposalExists, UserNotBranchReviewer)
from lp.code.interfaces.branchlookup import IBranchLookup
from lp.code.interfaces.branchmergeproposal import (
IBranchMergeProposalGetter, ICreateMergeProposalJobSource)
=== modified file 'lib/lp/code/model/branch.py'
--- lib/lp/code/model/branch.py 2010-07-29 19:12:10 +0000
+++ lib/lp/code/model/branch.py 2010-08-02 03:45:58 +0000
@@ -55,7 +55,9 @@
BranchLifecycleStatus, BranchMergeControlStatus,
BranchMergeProposalStatus, BranchType)
from lp.code.errors import (
- BranchMergeProposalExists, InvalidBranchMergeProposal)
+ BranchCannotBePrivate, BranchCannotBePublic, BranchTargetError,
+ BranchTypeError, BranchMergeProposalExists, CannotDeleteBranch,
+ InvalidBranchMergeProposal)
from lp.code.mail.branch import send_branch_modified_notifications
from lp.code.model.branchmergeproposal import (
BranchMergeProposal, BranchMergeProposalGetter)
@@ -65,9 +67,7 @@
from lp.code.model.seriessourcepackagebranch import SeriesSourcePackageBranch
from lp.code.event.branchmergeproposal import NewBranchMergeProposalEvent
from lp.code.interfaces.branch import (
- BranchCannotBePrivate, BranchCannotBePublic,
- BranchTargetError, BranchTypeError, BzrIdentityMixin, CannotDeleteBranch,
- DEFAULT_BRANCH_STATUS_IN_LISTING, IBranch,
+ BzrIdentityMixin, DEFAULT_BRANCH_STATUS_IN_LISTING, IBranch,
IBranchNavigationMenu, IBranchSet, user_has_special_branch_access)
from lp.code.interfaces.branchcollection import IAllBranches
from lp.code.interfaces.branchlookup import IBranchLookup
=== modified file 'lib/lp/code/model/branchlookup.py'
--- lib/lp/code/model/branchlookup.py 2009-11-20 15:58:09 +0000
+++ lib/lp/code/model/branchlookup.py 2010-08-02 03:45:58 +0000
@@ -21,7 +21,7 @@
from lp.registry.model.person import Person
from lp.registry.model.product import Product
from lp.registry.model.sourcepackagename import SourcePackageName
-from lp.code.interfaces.branch import NoSuchBranch
+from lp.code.errors import NoSuchBranch
from lp.code.interfaces.branchlookup import (
IBranchLookup, ILinkedBranchTraversable, ILinkedBranchTraverser)
from lp.code.interfaces.branchnamespace import (
=== modified file 'lib/lp/code/model/branchnamespace.py'
--- lib/lp/code/model/branchnamespace.py 2010-07-20 21:07:17 +0000
+++ lib/lp/code/model/branchnamespace.py 2010-08-02 03:45:58 +0000
@@ -26,11 +26,11 @@
BranchLifecycleStatus, BranchMergeControlStatus,
BranchSubscriptionDiffSize, BranchSubscriptionNotificationLevel,
BranchVisibilityRule, CodeReviewNotificationLevel)
+from lp.code.errors import (
+ BranchCreationForbidden, BranchCreatorNotMemberOfOwnerTeam,
+ BranchCreatorNotOwner, BranchExists, NoSuchBranch)
from lp.code.interfaces.branch import (
- BranchCreationForbidden, BranchCreatorNotMemberOfOwnerTeam,
- BranchCreatorNotOwner, BranchExists,
- IBranch, NoSuchBranch,
- user_has_special_branch_access)
+ IBranch, user_has_special_branch_access)
from lp.code.interfaces.branchnamespace import (
IBranchNamespace, IBranchNamespacePolicy, InvalidNamespace)
from lp.code.interfaces.branchtarget import IBranchTarget
=== modified file 'lib/lp/code/model/sourcepackagerecipedata.py'
--- lib/lp/code/model/sourcepackagerecipedata.py 2010-07-30 14:04:15 +0000
+++ lib/lp/code/model/sourcepackagerecipedata.py 2010-08-02 03:45:58 +0000
@@ -28,9 +28,9 @@
from canonical.launchpad.interfaces.lpstorm import IStore
from lp.code.errors import (
- ForbiddenInstruction, PrivateBranchRecipe, TooNewRecipeFormat)
+ ForbiddenInstruction, NoSuchBranch, PrivateBranchRecipe,
+ TooNewRecipeFormat)
from lp.code.model.branch import Branch
-from lp.code.interfaces.branch import NoSuchBranch
from lp.code.interfaces.branchlookup import IBranchLookup
=== modified file 'lib/lp/code/model/tests/test_branch.py'
--- lib/lp/code/model/tests/test_branch.py 2010-07-29 19:12:10 +0000
+++ lib/lp/code/model/tests/test_branch.py 2010-08-02 03:45:58 +0000
@@ -46,12 +46,12 @@
from lp.code.enums import (
BranchLifecycleStatus, BranchSubscriptionNotificationLevel, BranchType,
BranchVisibilityRule, CodeReviewNotificationLevel)
-from lp.code.errors import InvalidBranchMergeProposal
-from lp.code.interfaces.branch import (
+from lp.code.errors import (
BranchCannotBePrivate, BranchCannotBePublic,
BranchCreatorNotMemberOfOwnerTeam, BranchCreatorNotOwner,
- BranchTargetError, CannotDeleteBranch, DEFAULT_BRANCH_STATUS_IN_LISTING,
- IBranch)
+ BranchTargetError, CannotDeleteBranch, InvalidBranchMergeProposal)
+from lp.code.interfaces.branch import (
+ DEFAULT_BRANCH_STATUS_IN_LISTING, IBranch)
from lp.code.interfaces.branchjob import (
IBranchUpgradeJobSource, IBranchScanJobSource)
from lp.code.interfaces.branchlookup import IBranchLookup
=== modified file 'lib/lp/code/model/tests/test_branchlookup.py'
--- lib/lp/code/model/tests/test_branchlookup.py 2010-04-16 15:06:55 +0000
+++ lib/lp/code/model/tests/test_branchlookup.py 2010-08-02 03:45:58 +0000
@@ -13,7 +13,7 @@
from zope.security.proxy import removeSecurityProxy
from canonical.config import config
-from lp.code.interfaces.branch import NoSuchBranch
+from lp.code.errors import NoSuchBranch
from lp.code.interfaces.branchlookup import (
IBranchLookup, ILinkedBranchTraverser)
from lp.code.interfaces.branchnamespace import (
=== modified file 'lib/lp/code/model/tests/test_branchnamespace.py'
--- lib/lp/code/model/tests/test_branchnamespace.py 2010-07-22 19:57:26 +0000
+++ lib/lp/code/model/tests/test_branchnamespace.py 2010-08-02 03:45:58 +0000
@@ -19,7 +19,7 @@
from lp.registry.model.sourcepackage import SourcePackage
from lp.code.enums import (
BranchLifecycleStatus, BranchType, BranchVisibilityRule)
-from lp.code.interfaces.branch import (
+from lp.code.errors import (
BranchCreationForbidden, BranchCreatorNotMemberOfOwnerTeam,
BranchCreatorNotOwner, BranchExists, NoSuchBranch)
from lp.code.interfaces.branchnamespace import (
=== modified file 'lib/lp/code/model/tests/test_codeimport.py'
--- lib/lp/code/model/tests/test_codeimport.py 2010-04-06 21:15:25 +0000
+++ lib/lp/code/model/tests/test_codeimport.py 2010-08-02 03:45:58 +0000
@@ -15,13 +15,12 @@
from canonical.launchpad.testing.codeimporthelpers import (
make_running_import)
from lp.code.errors import (
- CodeImportAlreadyRequested, CodeImportAlreadyRunning,
- CodeImportNotInReviewedState)
+ BranchCreatorNotMemberOfOwnerTeam, CodeImportAlreadyRequested,
+ CodeImportAlreadyRunning, CodeImportNotInReviewedState)
from lp.code.model.codeimport import CodeImportSet
from lp.code.model.codeimportevent import CodeImportEvent
from lp.code.model.codeimportjob import CodeImportJob, CodeImportJobSet
from lp.code.model.codeimportresult import CodeImportResult
-from lp.code.interfaces.branch import BranchCreatorNotMemberOfOwnerTeam
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.registry.interfaces.person import IPersonSet
from lp.code.enums import (
=== modified file 'lib/lp/code/xmlrpc/branch.py'
--- lib/lp/code/xmlrpc/branch.py 2010-08-02 03:45:57 +0000
+++ lib/lp/code/xmlrpc/branch.py 2010-08-02 03:45:58 +0000
@@ -22,11 +22,11 @@
from lp.bugs.interfaces.bug import IBugSet
from canonical.launchpad.webapp.interfaces import ILaunchBag
from lp.code.enums import BranchType
-from lp.code.interfaces.branch import (
- BranchCreationException, BranchCreationForbidden, IBranch)
+from lp.code.errors import (
+ BranchCreationException, BranchCreationForbidden, NoSuchBranch)
+from lp.code.interfaces.branch import IBranch
from lp.registry.interfaces.person import IPersonSet
from lp.registry.interfaces.product import IProductSet
-from lp.code.interfaces.branch import NoSuchBranch
from lp.code.interfaces.branchlookup import IBranchLookup
from lp.code.interfaces.branchnamespace import (
get_branch_namespace, InvalidNamespace)
=== modified file 'lib/lp/code/xmlrpc/codehosting.py'
--- lib/lp/code/xmlrpc/codehosting.py 2010-08-02 03:45:57 +0000
+++ lib/lp/code/xmlrpc/codehosting.py 2010-08-02 03:45:58 +0000
@@ -33,7 +33,7 @@
from lp.code.errors import UnknownBranchTypeError
from lp.code.bzr import BranchFormat, ControlFormat, RepositoryFormat
from lp.code.enums import BranchType
-from lp.code.interfaces.branch import BranchCreationException
+from lp.code.errors import BranchCreationException
from lp.code.interfaces.branchlookup import IBranchLookup
from lp.code.interfaces.branchnamespace import (
InvalidNamespace, lookup_branch_namespace, split_unique_name)
=== modified file 'lib/lp/registry/browser/productseries.py'
--- lib/lp/registry/browser/productseries.py 2010-08-02 03:45:57 +0000
+++ lib/lp/registry/browser/productseries.py 2010-08-02 03:45:58 +0000
@@ -55,8 +55,8 @@
from lp.code.browser.branch import BranchNameValidationMixin
from lp.code.browser.branchref import BranchRef
from lp.code.enums import BranchType, RevisionControlSystems
-from lp.code.interfaces.branch import (
- BranchCreationForbidden, BranchExists, IBranch)
+from lp.code.errors import BranchCreationForbidden, BranchExists
+from lp.code.interfaces.branch import IBranch
from lp.code.interfaces.branchjob import IRosettaUploadJobSource
from lp.code.interfaces.branchtarget import IBranchTarget
from lp.code.interfaces.codeimport import (