/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 brzlib/errors.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 14:47:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521144752-8o6jt0a6xat9g7lm
More renames; commands in output, environment variables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
# 'unprintable'.
33
33
 
34
34
 
35
 
# return codes from the bzr program
 
35
# return codes from the brz program
36
36
EXIT_OK = 0
37
37
EXIT_ERROR = 3
38
38
EXIT_INTERNAL_ERROR = 4
42
42
    """
43
43
    Base class for errors raised by brzlib.
44
44
 
45
 
    :cvar internal_error: if True this was probably caused by a bzr bug and
 
45
    :cvar internal_error: if True this was probably caused by a brz bug and
46
46
        should be displayed with a traceback; if False (or absent) this was
47
47
        probably a user or environment error and they don't need the gory
48
48
        details.  (That can be overridden by -Derror on the command line.)
269
269
class NoHelpTopic(BzrError):
270
270
 
271
271
    _fmt = ("No help could be found for '%(topic)s'. "
272
 
        "Please use 'bzr help topics' to obtain a list of topics.")
 
272
        "Please use 'brz help topics' to obtain a list of topics.")
273
273
 
274
274
    def __init__(self, topic):
275
275
        self.topic = topic
465
465
    """Used when renaming and both source and dest exist."""
466
466
 
467
467
    _fmt = ("Could not rename %(source)s => %(dest)s because both files exist."
468
 
            " (Use --after to tell bzr about a rename that has already"
 
468
            " (Use --after to tell brz about a rename that has already"
469
469
            " happened)%(extra)s")
470
470
 
471
471
    def __init__(self, source, dest, extra=None):
727
727
class BranchExistsWithoutWorkingTree(PathError):
728
728
 
729
729
    _fmt = 'Directory contains a branch, but no working tree \
730
 
(use bzr checkout if you wish to build a working tree): "%(path)s"'
 
730
(use brz checkout if you wish to build a working tree): "%(path)s"'
731
731
 
732
732
 
733
733
class AtomicFileAlreadyClosed(PathError):
760
760
 
761
761
class UnsupportedFormatError(BzrError):
762
762
 
763
 
    _fmt = "Unsupported branch format: %(format)s\nPlease run 'bzr upgrade'"
 
763
    _fmt = "Unsupported branch format: %(format)s\nPlease run 'brz upgrade'"
764
764
 
765
765
 
766
766
class UnknownFormatError(BzrError):
1054
1054
class LockCorrupt(LockError):
1055
1055
 
1056
1056
    _fmt = ("Lock is apparently held, but corrupted: %(corruption_info)s\n"
1057
 
            "Use 'bzr break-lock' to clear it")
 
1057
            "Use 'brz break-lock' to clear it")
1058
1058
 
1059
1059
    internal_error = False
1060
1060
 
1763
1763
class ConfigOptionValueError(BzrError):
1764
1764
 
1765
1765
    _fmt = ('Bad value "%(value)s" for option "%(name)s".\n'
1766
 
            'See ``bzr help %(name)s``')
 
1766
            'See ``brz help %(name)s``')
1767
1767
 
1768
1768
    def __init__(self, name, value):
1769
1769
        BzrError.__init__(self, name=name, value=value)
2067
2067
 
2068
2068
class UninitializableFormat(BzrError):
2069
2069
 
2070
 
    _fmt = "Format %(format)s cannot be initialised by this version of bzr."
 
2070
    _fmt = "Format %(format)s cannot be initialised by this version of brz."
2071
2071
 
2072
2072
    def __init__(self, format):
2073
2073
        BzrError.__init__(self)
2165
2165
 
2166
2166
class OutOfDateTree(BzrError):
2167
2167
 
2168
 
    _fmt = "Working tree is out of date, please run 'bzr update'.%(more)s"
 
2168
    _fmt = "Working tree is out of date, please run 'brz update'.%(more)s"
2169
2169
 
2170
2170
    def __init__(self, tree, more=None):
2171
2171
        if more is None:
2214
2214
class CorruptRepository(BzrError):
2215
2215
 
2216
2216
    _fmt = ("An error has been detected in the repository %(repo_path)s.\n"
2217
 
            "Please run bzr reconcile on this repository.")
 
2217
            "Please run brz reconcile on this repository.")
2218
2218
 
2219
2219
    def __init__(self, repo):
2220
2220
        BzrError.__init__(self)
2407
2407
 
2408
2408
class UnknownSSH(BzrError):
2409
2409
 
2410
 
    _fmt = "Unrecognised value for BZR_SSH environment variable: %(vendor)s"
 
2410
    _fmt = "Unrecognised value for BRZ_SSH environment variable: %(vendor)s"
2411
2411
 
2412
2412
    def __init__(self, vendor):
2413
2413
        BzrError.__init__(self)
2417
2417
class SSHVendorNotFound(BzrError):
2418
2418
 
2419
2419
    _fmt = ("Don't know how to handle SSH connections."
2420
 
            " Please set BZR_SSH environment variable.")
 
2420
            " Please set BRZ_SSH environment variable.")
2421
2421
 
2422
2422
 
2423
2423
class GhostRevisionsHaveNoRevno(BzrError):
2575
2575
class TagsNotSupported(BzrError):
2576
2576
 
2577
2577
    _fmt = ("Tags not supported by %(branch)s;"
2578
 
            " you may be able to use bzr upgrade.")
 
2578
            " you may be able to use brz upgrade.")
2579
2579
 
2580
2580
    def __init__(self, branch):
2581
2581
        self.branch = branch
2592
2592
class MalformedBugIdentifier(BzrError):
2593
2593
 
2594
2594
    _fmt = ('Did not understand bug identifier %(bug_id)s: %(reason)s. '
2595
 
            'See "bzr help bugs" for more information on this feature.')
 
2595
            'See "brz help bugs" for more information on this feature.')
2596
2596
 
2597
2597
    def __init__(self, bug_id, reason):
2598
2598
        self.bug_id = bug_id
2805
2805
class UnsyncedBranches(BzrDirError):
2806
2806
 
2807
2807
    _fmt = ("'%(display_url)s' is not in sync with %(target_url)s.  See"
2808
 
            " bzr help sync-for-reconfigure.")
 
2808
            " brz help sync-for-reconfigure.")
2809
2809
 
2810
2810
    def __init__(self, bzrdir, target_branch):
2811
2811
        BzrDirError.__init__(self, bzrdir)
2869
2869
class UncommittedChanges(BzrError):
2870
2870
 
2871
2871
    _fmt = ('Working tree "%(display_url)s" has uncommitted changes'
2872
 
            ' (See bzr status).%(more)s')
 
2872
            ' (See brz status).%(more)s')
2873
2873
 
2874
2874
    def __init__(self, tree, more=None):
2875
2875
        if more is None:
2903
2903
class ShelvedChanges(UncommittedChanges):
2904
2904
 
2905
2905
    _fmt = ('Working tree "%(display_url)s" has shelved changes'
2906
 
            ' (See bzr shelve --list).%(more)s')
 
2906
            ' (See brz shelve --list).%(more)s')
2907
2907
 
2908
2908
 
2909
2909
class MissingTemplateVariable(BzrError):
2955
2955
 
2956
2956
    def __str__(self):
2957
2957
 
2958
 
        _fmt = ('"%s" is not a standard bzr command. \n'
 
2958
        _fmt = ('"%s" is not a standard brz command. \n'
2959
2959
                'However, the following official plugin provides this command: %s\n'
2960
2960
                'You can install it by going to: %s'
2961
2961
                % (self.cmd_name, self.plugin_metadata['name'],
3124
3124
    """
3125
3125
 
3126
3126
    _fmt = ("Views are not supported by %(tree)s;"
3127
 
            " use 'bzr upgrade' to change your tree to a later format.")
 
3127
            " use 'brz upgrade' to change your tree to a later format.")
3128
3128
 
3129
3129
    def __init__(self, tree):
3130
3130
        self.tree = tree
3209
3209
 
3210
3210
    _fmt = ('Unable to determine your name.\n'
3211
3211
        "Please, set your name with the 'whoami' command.\n"
3212
 
        'E.g. bzr whoami "Your Name <name@example.com>"')
 
3212
        'E.g. brz whoami "Your Name <name@example.com>"')
3213
3213
 
3214
3214
 
3215
3215
class InvalidPattern(BzrError):
3223
3223
class RecursiveBind(BzrError):
3224
3224
 
3225
3225
    _fmt = ('Branch "%(branch_url)s" appears to be bound to itself. '
3226
 
        'Please use `bzr unbind` to fix.')
 
3226
        'Please use `brz unbind` to fix.')
3227
3227
 
3228
3228
    def __init__(self, branch_url):
3229
3229
        self.branch_url = branch_url