~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Aaron Bentley
  • Date: 2007-02-16 07:02:19 UTC
  • mfrom: (2292 +trunk)
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070216070219-b22k0gwnisnxawnk
Merged bzr.dev (17 tests failing)

Show diffs side-by-side

added added

removed removed

Lines of Context:
781
781
        BzrError.__init__(self, branch=branch, revision=revision)
782
782
 
783
783
 
 
784
class NotLeftParentDescendant(BzrError):
 
785
 
 
786
    _fmt = "Revision %(old_revision)s is not the left parent of"\
 
787
        " %(new_revision)s, but branch %(branch_location)s expects this"
 
788
 
 
789
    internal_error = True
 
790
 
 
791
    def __init__(self, branch, old_revision, new_revision):
 
792
        BzrError.__init__(self, branch_location=branch.base,
 
793
                          old_revision=old_revision,
 
794
                          new_revision=new_revision)
 
795
 
 
796
 
784
797
class NoSuchRevisionSpec(BzrError):
785
798
 
786
799
    _fmt = "No namespace registered for string: %(spec)r"
806
819
    _fmt = "%(branch)s is missing %(object_type)s {%(object_id)s}"
807
820
 
808
821
 
 
822
class AppendRevisionsOnlyViolation(BzrError):
 
823
 
 
824
    _fmt = 'Operation denied because it would change the main history, '\
 
825
           'which is not permitted by the append_revisions_only setting on'\
 
826
           ' branch "%(location)s".'
 
827
 
 
828
    def __init__(self, location):
 
829
       import bzrlib.urlutils as urlutils
 
830
       location = urlutils.unescape_for_display(location, 'ascii')
 
831
       BzrError.__init__(self, location=location)
 
832
 
 
833
 
809
834
class DivergedBranches(BzrError):
810
835
    
811
836
    _fmt = "These branches have diverged.  Use the merge command to reconcile them."""
817
842
        self.branch2 = branch2
818
843
 
819
844
 
 
845
class NotLefthandHistory(BzrError):
 
846
 
 
847
    _fmt = "Supplied history does not follow left-hand parents"
 
848
 
 
849
    internal_error = True
 
850
 
 
851
    def __init__(self, history):
 
852
        BzrError.__init__(self, history=history)
 
853
 
 
854
 
820
855
class UnrelatedBranches(BzrError):
821
856
 
822
857
    _fmt = "Branches have no common ancestor, and no merge base revision was specified."