/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: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Exceptions for bzr, and reporting of them.
18
18
"""
1173
1173
class DivergedBranches(BzrError):
1174
1174
 
1175
1175
    _fmt = ("These branches have diverged."
1176
 
            " Use the merge command to reconcile them.")
 
1176
            " Use the missing command to see how.\n"
 
1177
            "Use the merge command to reconcile them.")
1177
1178
 
1178
1179
    def __init__(self, branch1, branch2):
1179
1180
        self.branch1 = branch1
1227
1228
            not_ancestor_id=not_ancestor_id)
1228
1229
 
1229
1230
 
1230
 
class InstallFailed(BzrError):
1231
 
 
1232
 
    def __init__(self, revisions):
1233
 
        revision_str = ", ".join(str(r) for r in revisions)
1234
 
        msg = "Could not install revisions:\n%s" % revision_str
1235
 
        BzrError.__init__(self, msg)
1236
 
        self.revisions = revisions
1237
 
 
1238
 
 
1239
1231
class AmbiguousBase(BzrError):
1240
1232
 
1241
1233
    def __init__(self, bases):
2309
2301
        self.transport = transport
2310
2302
 
2311
2303
 
2312
 
class NoSmartServer(NotBranchError):
2313
 
 
2314
 
    _fmt = "No smart server available at %(url)s"
2315
 
 
2316
 
    @symbol_versioning.deprecated_method(symbol_versioning.one_four)
2317
 
    def __init__(self, url):
2318
 
        self.url = url
2319
 
 
2320
 
 
2321
2304
class UnknownSSH(BzrError):
2322
2305
 
2323
2306
    _fmt = "Unrecognised value for BZR_SSH environment variable: %(vendor)s"
2532
2515
        self.branch = branch
2533
2516
 
2534
2517
 
 
2518
class InvalidLineInBugsProperty(BzrError):
 
2519
 
 
2520
    _fmt = ("Invalid line in bugs property: '%(line)s'")
 
2521
 
 
2522
    def __init__(self, line):
 
2523
        self.line = line
 
2524
 
 
2525
 
 
2526
class InvalidBugStatus(BzrError):
 
2527
 
 
2528
    _fmt = ("Invalid bug status: '%(status)s'")
 
2529
 
 
2530
    def __init__(self, status):
 
2531
        self.status = status
 
2532
 
 
2533
 
2535
2534
class UnexpectedSmartServerResponse(BzrError):
2536
2535
 
2537
2536
    _fmt = "Could not understand response from smart server: %(response_tuple)r"
2843
2842
    pass
2844
2843
 
2845
2844
 
2846
 
class NotATerminal(BzrError):
2847
 
 
2848
 
    _fmt = 'Unable to ask for a password without real terminal.'
2849
 
 
2850
 
 
2851
2845
class UnableEncodePath(BzrError):
2852
2846
 
2853
2847
    _fmt = ('Unable to encode %(kind)s path %(path)r in '
2958
2952
        BzrError.__init__(self, invalid_id=invalid_id)
2959
2953
 
2960
2954
 
 
2955
class JailBreak(BzrError):
 
2956
 
 
2957
    _fmt = "An attempt to access a url outside the server jail was made: '%(url)s'."
 
2958
 
 
2959
    def __init__(self, url):
 
2960
        BzrError.__init__(self, url=url)
 
2961
 
 
2962
 
2961
2963
class UserAbort(BzrError):
2962
2964
 
2963
2965
    _fmt = 'The user aborted the operation.'
3023
3025
 
3024
3026
    def __init__(self, repository):
3025
3027
        self.repository = repository
 
3028
 
 
3029
 
 
3030
class LossyPushToSameVCS(BzrError):
 
3031
 
 
3032
    _fmt = ("Lossy push not possible between %(source_branch)r and "
 
3033
            "%(target_branch)r that are in the same VCS.")
 
3034
 
 
3035
    internal_error = True
 
3036
 
 
3037
    def __init__(self, source_branch, target_branch):
 
3038
        self.source_branch = source_branch
 
3039
        self.target_branch = target_branch