/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: Aaron Bentley
  • Date: 2007-02-13 22:25:26 UTC
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070213222526-ztxquwl9cax22cbf
Change asserts to specific errors for left-hand history violations

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=branch, old_revision=old_revision,
 
790
                          new_revision=new_revision)
 
791
 
 
792
 
781
793
class NoSuchRevisionSpec(BzrError):
782
794
 
783
795
    _fmt = "No namespace registered for string: %(spec)r"
826
838
        self.branch2 = branch2
827
839
 
828
840
 
 
841
class NotLefthandHistory(BzrError):
 
842
 
 
843
    _fmt = "Supplied history does not follow left-hand parents"
 
844
 
 
845
    internal_error = True
 
846
 
 
847
    def __init__(self, history):
 
848
        BzrError.__init__(self, history=history)
 
849
 
 
850
 
829
851
class UnrelatedBranches(BzrError):
830
852
 
831
853
    _fmt = "Branches have no common ancestor, and no merge base revision was specified."