/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: Martin Packman
  • Date: 2012-04-30 10:44:04 UTC
  • mto: (6437.54.4 2.5)
  • mto: This revision was merged to the branch mainline in revision 6525.
  • Revision ID: martin.packman@canonical.com-20120430104404-0tqn17kcmiv793fh
Correct and test fallback to ascii logic when a stream has no encoding

Show diffs side-by-side

added added

removed removed

Lines of Context:
710
710
    _fmt = 'Already a branch: "%(path)s".'
711
711
 
712
712
 
713
 
class InvalidBranchName(PathError):
714
 
 
715
 
    _fmt = "Invalid branch name: %(name)s"
716
 
 
717
 
    def __init__(self, name):
718
 
        BzrError.__init__(self)
719
 
        self.name = name
720
 
 
721
 
 
722
713
class ParentBranchExists(AlreadyBranchError):
723
714
 
724
715
    _fmt = 'Parent branch already exists: "%(path)s".'
2777
2768
    _fmt = "No mail-to address (--mail-to) or output (-o) specified."
2778
2769
 
2779
2770
 
 
2771
class UnknownMailClient(BzrError):
 
2772
 
 
2773
    _fmt = "Unknown mail client: %(mail_client)s"
 
2774
 
 
2775
    def __init__(self, mail_client):
 
2776
        BzrError.__init__(self, mail_client=mail_client)
 
2777
 
 
2778
 
2780
2779
class MailClientNotFound(BzrError):
2781
2780
 
2782
2781
    _fmt = "Unable to find mail client with the following names:"\
2893
2892
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2894
2893
 
2895
2894
 
2896
 
class StoringUncommittedNotSupported(BzrError):
2897
 
 
2898
 
    _fmt = ('Branch "%(display_url)s" does not support storing uncommitted'
2899
 
            ' changes.')
2900
 
 
2901
 
    def __init__(self, branch):
2902
 
        import bzrlib.urlutils as urlutils
2903
 
        user_url = getattr(branch, "user_url", None)
2904
 
        if user_url is None:
2905
 
            display_url = str(branch)
2906
 
        else:
2907
 
            display_url = urlutils.unescape_for_display(user_url, 'ascii')
2908
 
        BzrError.__init__(self, branch=branch, display_url=display_url)
2909
 
 
2910
 
 
2911
2895
class ShelvedChanges(UncommittedChanges):
2912
2896
 
2913
2897
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
3250
3234
 
3251
3235
class ExpandingUnknownOption(BzrError):
3252
3236
 
3253
 
    _fmt = 'Option "%(name)s" is not defined while expanding "%(string)s".'
 
3237
    _fmt = 'Option %(name)s is not defined while expanding "%(string)s".'
3254
3238
 
3255
3239
    def __init__(self, name, string):
3256
3240
        self.name = name
3257
3241
        self.string = string
3258
3242
 
3259
3243
 
3260
 
class IllegalOptionName(BzrError):
3261
 
 
3262
 
    _fmt = 'Option "%(name)s" is not allowed.'
3263
 
 
3264
 
    def __init__(self, name):
3265
 
        self.name = name
3266
 
 
3267
 
 
3268
3244
class NoCompatibleInter(BzrError):
3269
3245
 
3270
3246
    _fmt = ('No compatible object available for operations from %(source)r '
3363
3339
 
3364
3340
    def __init__(self, feature):
3365
3341
        self.feature = feature
3366
 
 
3367
 
 
3368
 
class ChangesAlreadyStored(BzrCommandError):
3369
 
 
3370
 
    _fmt = ('Cannot store uncommitted changes because this branch already'
3371
 
            ' stores uncommitted changes.')