/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 Pool
  • Date: 2010-06-24 06:53:06 UTC
  • mfrom: (5317 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5343.
  • Revision ID: mbp@sourcefrog.net-20100624065306-qcx1wg84ufuckime
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1041
1041
class LockContention(LockError):
1042
1042
 
1043
1043
    _fmt = 'Could not acquire lock "%(lock)s": %(msg)s'
1044
 
    # TODO: show full url for lock, combining the transport and relative
1045
 
    # bits?
1046
1044
 
1047
1045
    internal_error = False
1048
1046
 
1179
1177
 
1180
1178
class InvalidRevisionSpec(BzrError):
1181
1179
 
1182
 
    _fmt = ("Requested revision: %(spec)r does not exist in branch:"
 
1180
    _fmt = ("Requested revision: '%(spec)s' does not exist in branch:"
1183
1181
            " %(branch)s%(extra)s")
1184
1182
 
1185
1183
    def __init__(self, spec, branch, extra=None):
1297
1295
class BoundBranchOutOfDate(BzrError):
1298
1296
 
1299
1297
    _fmt = ("Bound branch %(branch)s is out of date with master branch"
1300
 
            " %(master)s.")
 
1298
            " %(master)s.%(extra_help)s")
1301
1299
 
1302
1300
    def __init__(self, branch, master):
1303
1301
        BzrError.__init__(self)
1304
1302
        self.branch = branch
1305
1303
        self.master = master
 
1304
        self.extra_help = ''
1306
1305
 
1307
1306
 
1308
1307
class CommitToDoubleBoundBranch(BzrError):
1924
1923
    _fmt = "Moving the root directory is not supported at this time"
1925
1924
 
1926
1925
 
 
1926
class TransformRenameFailed(BzrError):
 
1927
 
 
1928
    _fmt = "Failed to rename %(from_path)s to %(to_path)s: %(why)s"
 
1929
 
 
1930
    def __init__(self, from_path, to_path, why, errno):
 
1931
        self.from_path = from_path
 
1932
        self.to_path = to_path
 
1933
        self.why = why
 
1934
        self.errno = errno
 
1935
 
 
1936
 
1927
1937
class BzrMoveFailedError(BzrError):
1928
1938
 
1929
1939
    _fmt = "Could not move %(from_path)s%(operator)s %(to_path)s%(extra)s"
2175
2185
 
2176
2186
    def __init__(self, repo):
2177
2187
        BzrError.__init__(self)
2178
 
        self.repo_path = repo.bzrdir.root_transport.base
 
2188
        self.repo_path = repo.user_url
2179
2189
 
2180
2190
 
2181
2191
class InconsistentDelta(BzrError):
2753
2763
 
2754
2764
    def __init__(self, bzrdir):
2755
2765
        import bzrlib.urlutils as urlutils
2756
 
        display_url = urlutils.unescape_for_display(bzrdir.root_transport.base,
 
2766
        display_url = urlutils.unescape_for_display(bzrdir.user_url,
2757
2767
                                                    'ascii')
2758
2768
        BzrError.__init__(self, bzrdir=bzrdir, display_url=display_url)
2759
2769
 
2834
2844
            more = ' ' + more
2835
2845
        import bzrlib.urlutils as urlutils
2836
2846
        display_url = urlutils.unescape_for_display(
2837
 
            tree.bzrdir.root_transport.base, 'ascii')
 
2847
            tree.user_url, 'ascii')
2838
2848
        BzrError.__init__(self, tree=tree, display_url=display_url, more=more)
2839
2849
 
2840
2850
 
 
2851
class ShelvedChanges(UncommittedChanges):
 
2852
 
 
2853
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
 
2854
            ' (See bzr shelve --list).%(more)s')
 
2855
 
 
2856
 
2841
2857
class MissingTemplateVariable(BzrError):
2842
2858
 
2843
2859
    _fmt = 'Variable {%(name)s} is not available.'
3124
3140
 
3125
3141
    def __init__(self, path):
3126
3142
        self.path = path
 
3143
 
 
3144
 
 
3145
class NoColocatedBranchSupport(BzrError):
 
3146
 
 
3147
    _fmt = ("%(bzrdir)r does not support co-located branches.")
 
3148
 
 
3149
    def __init__(self, bzrdir):
 
3150
        self.bzrdir = bzrdir
 
3151
 
 
3152
class NoWhoami(BzrError):
 
3153
 
 
3154
    _fmt = ('Unable to determine your name.\n'
 
3155
        "Please, set your name with the 'whoami' command.\n"
 
3156
        'E.g. bzr whoami "Your Name <name@example.com>"')
 
3157
 
 
3158