~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Martin Pool
  • Date: 2007-02-21 05:34:56 UTC
  • mfrom: (2296 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2309.
  • Revision ID: mbp@sourcefrog.net-20070221053456-vyr6o0ehqnbetrvb
merge trunk, in particular new Branch6 changes

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"
803
816
    _fmt = "%(branch)s is missing %(object_type)s {%(object_id)s}"
804
817
 
805
818
 
 
819
class AppendRevisionsOnlyViolation(BzrError):
 
820
 
 
821
    _fmt = 'Operation denied because it would change the main history, '\
 
822
           'which is not permitted by the append_revisions_only setting on'\
 
823
           ' branch "%(location)s".'
 
824
 
 
825
    def __init__(self, location):
 
826
       import bzrlib.urlutils as urlutils
 
827
       location = urlutils.unescape_for_display(location, 'ascii')
 
828
       BzrError.__init__(self, location=location)
 
829
 
 
830
 
806
831
class DivergedBranches(BzrError):
807
832
    
808
833
    _fmt = "These branches have diverged.  Use the merge command to reconcile them."""
814
839
        self.branch2 = branch2
815
840
 
816
841
 
 
842
class NotLefthandHistory(BzrError):
 
843
 
 
844
    _fmt = "Supplied history does not follow left-hand parents"
 
845
 
 
846
    internal_error = True
 
847
 
 
848
    def __init__(self, history):
 
849
        BzrError.__init__(self, history=history)
 
850
 
 
851
 
817
852
class UnrelatedBranches(BzrError):
818
853
 
819
854
    _fmt = "Branches have no common ancestor, and no merge base revision was specified."