~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-02 23:49:34 UTC
  • mfrom: (5362.1.1 merge-2.2-into-trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100802234934-d963xmqwx5gzevr0
(Andrew Bennetts) Merge 2.2 branch back into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
949
949
    # original exception is available as e.original_error
950
950
    #
951
951
    # New code should prefer to raise specific subclasses
952
 
    def __init__(self, message):
953
 
        # Python 2.5 uses a slot for StandardError.message,
954
 
        # so use a different variable name.  We now work around this in
955
 
        # BzrError.__str__, but this member name is kept for compatability.
956
 
        self.msg = message
 
952
    def __init__(self, msg):
 
953
        self.msg = msg
957
954
 
958
955
 
959
956
class LockActive(LockError):
1381
1378
 
1382
1379
class WeaveParentMismatch(WeaveError):
1383
1380
 
1384
 
    _fmt = "Parents are mismatched between two revisions. %(message)s"
 
1381
    _fmt = "Parents are mismatched between two revisions. %(msg)s"
1385
1382
 
1386
1383
 
1387
1384
class WeaveInvalidChecksum(WeaveError):
1388
1385
 
1389
 
    _fmt = "Text did not match it's checksum: %(message)s"
 
1386
    _fmt = "Text did not match it's checksum: %(msg)s"
1390
1387
 
1391
1388
 
1392
1389
class WeaveTextDiffers(WeaveError):
1440
1437
 
1441
1438
class VersionedFileInvalidChecksum(VersionedFileError):
1442
1439
 
1443
 
    _fmt = "Text did not match its checksum: %(message)s"
 
1440
    _fmt = "Text did not match its checksum: %(msg)s"
1444
1441
 
1445
1442
 
1446
1443
class KnitError(InternalBzrError):
3152
3149
    def __init__(self, bzrdir):
3153
3150
        self.bzrdir = bzrdir
3154
3151
 
 
3152
 
3155
3153
class NoWhoami(BzrError):
3156
3154
 
3157
3155
    _fmt = ('Unable to determine your name.\n'
3158
3156
        "Please, set your name with the 'whoami' command.\n"
3159
3157
        'E.g. bzr whoami "Your Name <name@example.com>"')
3160
3158
 
 
3159
 
3161
3160
class InvalidPattern(BzrError):
3162
3161
 
3163
3162
    _fmt = ('Invalid pattern(s) found. %(msg)s')
3165
3164
    def __init__(self, msg):
3166
3165
        self.msg = msg
3167
3166
 
 
3167
 
 
3168
class RecursiveBind(BzrError):
 
3169
 
 
3170
    _fmt = ('Branch "%(branch_url)s" appears to be bound to itself. '
 
3171
        'Please use `bzr unbind` to fix.')
 
3172
 
 
3173
    def __init__(self, branch_url):
 
3174
        self.branch_url = branch_url
 
3175