/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: Aaron Bentley
  • Date: 2008-02-24 16:42:13 UTC
  • mfrom: (3234 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: aaron@aaronbentley.com-20080224164213-eza1lzru5bwuwmmj
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008 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
267
267
        "record_entry_contents.")
268
268
 
269
269
 
 
270
class NoPublicBranch(BzrError):
 
271
 
 
272
    _fmt = 'There is no public branch set for "%(branch_url)s".'
 
273
 
 
274
    def __init__(self, branch):
 
275
        import bzrlib.urlutils as urlutils
 
276
        public_location = urlutils.unescape_for_display(branch.base, 'ascii')
 
277
        BzrError.__init__(self, branch_url=public_location)
 
278
 
 
279
 
270
280
class NoHelpTopic(BzrError):
271
281
 
272
282
    _fmt = ("No help could be found for '%(topic)s'. "
1870
1880
        BzrError.__init__(self, path)
1871
1881
 
1872
1882
 
 
1883
class ExecutableMissing(BzrError):
 
1884
 
 
1885
    _fmt = "%(exe_name)s could not be found on this machine"
 
1886
 
 
1887
    def __init__(self, exe_name):
 
1888
        BzrError.__init__(self, exe_name=exe_name)
 
1889
 
 
1890
 
1873
1891
class NoDiff(BzrError):
1874
1892
 
1875
1893
    _fmt = "Diff is not installed on this machine: %(msg)s"
1963
1981
    _fmt = "Format error in conflict listings"
1964
1982
 
1965
1983
 
 
1984
class CorruptDirstate(BzrError):
 
1985
 
 
1986
    _fmt = ("Inconsistency in dirstate file %(dirstate_path)s.\n"
 
1987
            "Error: %(description)s")
 
1988
 
 
1989
    def __init__(self, dirstate_path, description):
 
1990
        BzrError.__init__(self)
 
1991
        self.dirstate_path = dirstate_path
 
1992
        self.description = description
 
1993
 
 
1994
 
1966
1995
class CorruptRepository(BzrError):
1967
1996
 
1968
1997
    _fmt = ("An error has been detected in the repository %(repo_path)s.\n"
1973
2002
        self.repo_path = repo.bzrdir.root_transport.base
1974
2003
 
1975
2004
 
 
2005
class InconsistentDelta(BzrError):
 
2006
    """Used when we get a delta that is not valid."""
 
2007
 
 
2008
    _fmt = ("An inconsistent delta was supplied involving %(path)r,"
 
2009
            " %(file_id)r\nreason: %(reason)s")
 
2010
 
 
2011
    def __init__(self, path, file_id, reason):
 
2012
        BzrError.__init__(self)
 
2013
        self.path = path
 
2014
        self.file_id = file_id
 
2015
        self.reason = reason
 
2016
 
 
2017
 
1976
2018
class UpgradeRequired(BzrError):
1977
2019
 
1978
2020
    _fmt = "To use this feature you must upgrade your branch at %(path)s."
2502
2544
        self.name = name
2503
2545
 
2504
2546
 
 
2547
class NoTemplate(BzrError):
 
2548
 
 
2549
    _fmt = 'No template specified.'
 
2550
 
 
2551
 
2505
2552
class UnableCreateSymlink(BzrError):
2506
2553
 
2507
2554
    _fmt = 'Unable to create symlink %(path_str)son this platform'
2515
2562
                path_str = repr(path)
2516
2563
            path_str += ' '
2517
2564
        self.path_str = path_str
 
2565
 
 
2566
 
 
2567
class UnsupportedTimezoneFormat(BzrError):
 
2568
 
 
2569
    _fmt = ('Unsupported timezone format "%(timezone)s", '
 
2570
            'options are "utc", "original", "local".')
 
2571
 
 
2572
    def __init__(self, timezone):
 
2573
        self.timezone = timezone