~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

[merge] bzr.dev 2294

Show diffs side-by-side

added added

removed removed

Lines of Context:
778
778
        BzrError.__init__(self, branch=branch, revision=revision)
779
779
 
780
780
 
 
781
class NotLeftParentDescendant(BzrError):
 
782
 
 
783
    _fmt = "Revision %(old_revision)s is not the left parent of"\
 
784
        " %(new_revision)s, but branch %(branch_location)s expects this"
 
785
 
 
786
    internal_error = True
 
787
 
 
788
    def __init__(self, branch, old_revision, new_revision):
 
789
        BzrError.__init__(self, branch_location=branch.base,
 
790
                          old_revision=old_revision,
 
791
                          new_revision=new_revision)
 
792
 
 
793
 
781
794
class NoSuchRevisionSpec(BzrError):
782
795
 
783
796
    _fmt = "No namespace registered for string: %(spec)r"
814
827
    _fmt = "%(branch)s is missing %(object_type)s {%(object_id)s}"
815
828
 
816
829
 
 
830
class AppendRevisionsOnlyViolation(BzrError):
 
831
 
 
832
    _fmt = 'Operation denied because it would change the main history, '\
 
833
           'which is not permitted by the append_revisions_only setting on'\
 
834
           ' branch "%(location)s".'
 
835
 
 
836
    def __init__(self, location):
 
837
       import bzrlib.urlutils as urlutils
 
838
       location = urlutils.unescape_for_display(location, 'ascii')
 
839
       BzrError.__init__(self, location=location)
 
840
 
 
841
 
817
842
class DivergedBranches(BzrError):
818
843
    
819
844
    _fmt = "These branches have diverged.  Use the merge command to reconcile them."""
825
850
        self.branch2 = branch2
826
851
 
827
852
 
 
853
class NotLefthandHistory(BzrError):
 
854
 
 
855
    _fmt = "Supplied history does not follow left-hand parents"
 
856
 
 
857
    internal_error = True
 
858
 
 
859
    def __init__(self, history):
 
860
        BzrError.__init__(self, history=history)
 
861
 
 
862
 
828
863
class UnrelatedBranches(BzrError):
829
864
 
830
865
    _fmt = "Branches have no common ancestor, and no merge base revision was specified."
1688
1723
class NoSmartMedium(BzrError):
1689
1724
 
1690
1725
    _fmt = "The transport '%(transport)s' cannot tunnel the smart protocol."
 
1726
    internal_error = True
1691
1727
 
1692
1728
    def __init__(self, transport):
1693
1729
        self.transport = transport