~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-09 22:57:21 UTC
  • mfrom: (1551.12.48 mergedirective)
  • Revision ID: pqm@pqm.ubuntu.com-20070309225721-d395866527ca9a47
Add support for merge directives

Show diffs side-by-side

added added

removed removed

Lines of Context:
1605
1605
        self.tree = tree
1606
1606
 
1607
1607
 
 
1608
class PublicBranchOutOfDate(BzrError):
 
1609
 
 
1610
    _fmt = 'Public branch "%(public_location)s" lacks revision '\
 
1611
        '"%(revstring)s".'
 
1612
 
 
1613
    def __init__(self, public_location, revstring):
 
1614
        import bzrlib.urlutils as urlutils
 
1615
        public_location = urlutils.unescape_for_display(public_location,
 
1616
                                                        'ascii')
 
1617
        BzrError.__init__(self, public_location=public_location,
 
1618
                          revstring=revstring)
 
1619
 
 
1620
 
1608
1621
class MergeModifiedFormatError(BzrError):
1609
1622
 
1610
1623
    _fmt = "Error in merge modified format"
1854
1867
        self.name = name
1855
1868
 
1856
1869
 
 
1870
class NoMergeSource(BzrError):
 
1871
    """Raise if no merge source was specified for a merge directive"""
 
1872
 
 
1873
    _fmt = "A merge directive must provide either a bundle or a public"\
 
1874
        " branch location."
 
1875
 
 
1876
 
 
1877
class PatchMissing(BzrError):
 
1878
    """Raise a patch type was specified but no patch supplied"""
 
1879
 
 
1880
    _fmt = "patch_type was %(patch_type)s, but no patch was supplied."
 
1881
 
 
1882
    def __init__(self, patch_type):
 
1883
        BzrError.__init__(self)
 
1884
        self.patch_type = patch_type
 
1885
 
 
1886
 
1857
1887
class UnsupportedInventoryKind(BzrError):
1858
1888
    
1859
1889
    _fmt = """Unsupported entry kind %(kind)s"""