/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: John Arbash Meinel
  • Date: 2010-08-13 19:08:57 UTC
  • mto: (5050.17.7 2.2)
  • mto: This revision was merged to the branch mainline in revision 5379.
  • Revision ID: john@arbash-meinel.com-20100813190857-mvzwnimrxvm0zimp
Lots of documentation updates.

We had a lot of http links pointing to the old domain. They should
all now be properly updated to the new domain. (only bazaar-vcs.org
entry left is for pqm, which seems to still reside at the old url.)

Also removed one 'TODO' doc entry about switching to binary xdelta, since
we basically did just that with groupcompress.

Show diffs side-by-side

added added

removed removed

Lines of Context:
947
947
    # original exception is available as e.original_error
948
948
    #
949
949
    # New code should prefer to raise specific subclasses
950
 
    def __init__(self, message):
951
 
        # Python 2.5 uses a slot for StandardError.message,
952
 
        # so use a different variable name.  We now work around this in
953
 
        # BzrError.__str__, but this member name is kept for compatability.
954
 
        self.msg = message
 
950
    def __init__(self, msg):
 
951
        self.msg = msg
955
952
 
956
953
 
957
954
class LockActive(LockError):
1041
1038
class LockContention(LockError):
1042
1039
 
1043
1040
    _fmt = 'Could not acquire lock "%(lock)s": %(msg)s'
1044
 
    # TODO: show full url for lock, combining the transport and relative
1045
 
    # bits?
1046
1041
 
1047
1042
    internal_error = False
1048
1043
 
1380
1375
 
1381
1376
class WeaveParentMismatch(WeaveError):
1382
1377
 
1383
 
    _fmt = "Parents are mismatched between two revisions. %(message)s"
 
1378
    _fmt = "Parents are mismatched between two revisions. %(msg)s"
1384
1379
 
1385
1380
 
1386
1381
class WeaveInvalidChecksum(WeaveError):
1387
1382
 
1388
 
    _fmt = "Text did not match it's checksum: %(message)s"
 
1383
    _fmt = "Text did not match it's checksum: %(msg)s"
1389
1384
 
1390
1385
 
1391
1386
class WeaveTextDiffers(WeaveError):
1439
1434
 
1440
1435
class VersionedFileInvalidChecksum(VersionedFileError):
1441
1436
 
1442
 
    _fmt = "Text did not match its checksum: %(message)s"
 
1437
    _fmt = "Text did not match its checksum: %(msg)s"
1443
1438
 
1444
1439
 
1445
1440
class KnitError(InternalBzrError):
1925
1920
    _fmt = "Moving the root directory is not supported at this time"
1926
1921
 
1927
1922
 
 
1923
class TransformRenameFailed(BzrError):
 
1924
 
 
1925
    _fmt = "Failed to rename %(from_path)s to %(to_path)s: %(why)s"
 
1926
 
 
1927
    def __init__(self, from_path, to_path, why, errno):
 
1928
        self.from_path = from_path
 
1929
        self.to_path = to_path
 
1930
        self.why = why
 
1931
        self.errno = errno
 
1932
 
 
1933
 
1928
1934
class BzrMoveFailedError(BzrError):
1929
1935
 
1930
1936
    _fmt = "Could not move %(from_path)s%(operator)s %(to_path)s%(extra)s"
2839
2845
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2840
2846
 
2841
2847
 
 
2848
class ShelvedChanges(UncommittedChanges):
 
2849
 
 
2850
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
 
2851
            ' (See bzr shelve --list).%(more)s')
 
2852
 
 
2853
 
2842
2854
class MissingTemplateVariable(BzrError):
2843
2855
 
2844
2856
    _fmt = 'Variable {%(name)s} is not available.'
3134
3146
    def __init__(self, bzrdir):
3135
3147
        self.bzrdir = bzrdir
3136
3148
 
 
3149
 
 
3150
class NoWhoami(BzrError):
 
3151
 
 
3152
    _fmt = ('Unable to determine your name.\n'
 
3153
        "Please, set your name with the 'whoami' command.\n"
 
3154
        'E.g. bzr whoami "Your Name <name@example.com>"')
 
3155
 
 
3156
 
 
3157
class InvalidPattern(BzrError):
 
3158
 
 
3159
    _fmt = ('Invalid pattern(s) found. %(msg)s')
 
3160
 
 
3161
    def __init__(self, msg):
 
3162
        self.msg = msg
 
3163
 
 
3164
 
 
3165
class RecursiveBind(BzrError):
 
3166
 
 
3167
    _fmt = ('Branch "%(branch_url)s" appears to be bound to itself. '
 
3168
        'Please use `bzr unbind` to fix.')
 
3169
 
 
3170
    def __init__(self, branch_url):
 
3171
        self.branch_url = branch_url
 
3172