/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: James Westby
  • Date: 2008-07-12 00:52:42 UTC
  • mto: (3592.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3594.
  • Revision ID: jw+debian@jameswestby.net-20080712005242-evds1umvhyshu7er
Handle something that isn't a branch being specified in target_branch.

It's possible to create a merge directive where the target_branch isn't
a branch by the time that it gets to be merged, either because it uses
a local path not on the system where it is being merged, or the branch
has been deleted.

If this is the case and the target_branch needs to be consulted to
retrieve missing revisions then a NotBranchError was raised, which
was quite confusing. This provides a more precise error in that case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2358
2358
        self.patch_type = patch_type
2359
2359
 
2360
2360
 
 
2361
class TargetNotBranch(BzrError):
 
2362
    """A merge directive's target branch is required, but isn't a branch"""
 
2363
 
 
2364
    _fmt = ("Your branch does not have all of the revisions required in "
 
2365
            "order to merge this merge directive, however the target "
 
2366
            "branch specified in the merge directive is not a branch: "
 
2367
            "%(location)s.")
 
2368
 
 
2369
    def __init__(self, location):
 
2370
        BzrError.__init__(self)
 
2371
        self.location = location
 
2372
 
 
2373
 
2361
2374
class UnsupportedInventoryKind(BzrError):
2362
2375
    
2363
2376
    _fmt = """Unsupported entry kind %(kind)s"""