/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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
505
505
        self.format = format
506
506
 
507
507
 
508
 
 
509
508
class StrictCommitFailed(Exception):
510
509
    """Commit refused because there are unknowns in the tree."""
511
510
 
516
515
    is_user_error = False
517
516
 
518
517
    def __init__(self, branch, revision):
519
 
        self.branch = branch
520
 
        self.revision = revision
 
518
        BzrNewError.__init__(self, branch=branch, revision=revision)
 
519
 
 
520
 
 
521
class NoSuchRevisionSpec(BzrNewError):
 
522
    """No namespace registered for string: %(spec)r"""
 
523
 
 
524
    def __init__(self, spec):
 
525
        BzrNewError.__init__(self, spec=spec)
 
526
 
 
527
 
 
528
class InvalidRevisionSpec(BzrNewError):
 
529
    """Requested revision: '%(spec)s' does not exist in branch:
 
530
%(branch)s%(extra)s"""
 
531
 
 
532
    def __init__(self, spec, branch, extra=None):
 
533
        BzrNewError.__init__(self, branch=branch, spec=spec)
 
534
        if extra:
 
535
            self.extra = '\n' + str(extra)
 
536
        else:
 
537
            self.extra = ''
521
538
 
522
539
 
523
540
class HistoryMissing(BzrError):
586
603
        self.bases = bases
587
604
 
588
605
 
589
 
class NoCommits(BzrError):
 
606
class NoCommits(BzrNewError):
 
607
    """Branch %(branch)s has no commits."""
 
608
 
590
609
    def __init__(self, branch):
591
 
        msg = "Branch %s has no commits." % branch
592
 
        BzrError.__init__(self, msg)
 
610
        BzrNewError.__init__(self, branch=branch)
593
611
 
594
612
 
595
613
class UnlistableStore(BzrError):
777
795
 
778
796
 
779
797
class InvalidRange(TransportError):
780
 
    """Invalid range access."""
 
798
    """Invalid range access in %(path)s at %(offset)s."""
781
799
    
782
800
    def __init__(self, path, offset):
783
801
        TransportError.__init__(self, ("Invalid range access in %s at %d"
784
802
                                       % (path, offset)))
 
803
        self.path = path
 
804
        self.offset = offset
785
805
 
786
806
 
787
807
class InvalidHttpResponse(TransportError):
949
969
        DependencyNotPresent.__init__(self, 'paramiko', error)
950
970
 
951
971
 
 
972
class PointlessMerge(BzrNewError):
 
973
    """Nothing to merge."""
 
974
 
 
975
 
952
976
class UninitializableFormat(BzrNewError):
953
977
    """Format %(format)s cannot be initialised by this version of bzr."""
954
978