# 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
183
183
self.branch = branch
184
184
185
185
186
class InventoryModified(BzrNewError):
187
"""The current inventory for the tree %(tree)r has been modified, so a clean inventory cannot be read without data loss."""
188
189
def __init__(self, tree):
190
BzrNewError.__init__(self)
191
self.tree = tree
192
193
186
194
class NoSuchId(BzrNewError):
187
195
"""The file id %(file_id)s is not present in the tree %(tree)s."""
188
196
212
220
self.url = url
213
221
214
222
223
class NotWriteLocked(BzrNewError):
224
"""%(not_locked)r is not write locked but needs to be."""
225
226
def __init__(self, not_locked):
227
BzrNewError.__init__(self)
228
self.not_locked = not_locked
229
230
215
231
class BzrCommandError(BzrNewError):
216
232
"""Error from user command"""
217
233
270
286
"""Directory not empty: %(path)r%(extra)s"""
271
287
272
288
289
class ReadingCompleted(BzrNewError):
290
"""The MediumRequest '%(request)s' has already had finish_reading called upon it - the request has been completed and no more data may be read."""
291
292
is_user_error = False
293
294
def __init__(self, request):
295
BzrNewError.__init__(self)
296
self.request = request
297
298
273
299
class ResourceBusy(PathError):
274
300
"""Device or resource busy: %(path)r%(extra)s"""
275
301
802
828
803
829
class NoSuchExportFormat(BzrNewError):
804
830
"""Export format %(format)r not supported"""
831
805
832
def __init__(self, format):
806
833
BzrNewError.__init__(self)
807
834
self.format = format
808
835
809
836
837
838
class TooManyConcurrentRequests(BzrNewError):
839
"""The medium '%(medium)s' has reached its concurrent request limit. Be sure to finish_writing and finish_reading on the current request that is open."""
840
841
def __init__(self, medium):
842
BzrNewError.__init__(self)
843
self.medium = medium
844
845
810
846
class TransportError(BzrNewError):
811
847
"""Transport error: %(msg)s %(orig_error)s"""
812
848
908
944
BzrError.__init__(self, message)
909
945
910
946
947
class NoEmailInUsername(BzrNewError):
948
"""%(username)r does not seem to contain a reasonable email address"""
949
950
def __init__(self, username):
951
BzrNewError.__init__(self)
952
self.username = username
953
954
911
955
class SigningFailed(BzrError):
912
956
def __init__(self, command_line):
913
957
BzrError.__init__(self, "Failed to gpg sign data with command '%s'"
921
965
" unchanged." % tree.basedir)
922
966
923
967
968
class WritingCompleted(BzrNewError):
969
"""The MediumRequest '%(request)s' has already had finish_writing called upon it - accept bytes may not be called anymore."""
970
971
is_user_error = False
972
973
def __init__(self, request):
974
BzrNewError.__init__(self)
975
self.request = request
976
977
978
class WritingNotComplete(BzrNewError):
979
"""The MediumRequest '%(request)s' has not has finish_writing called upon it - until the write phase is complete no data may be read."""
980
981
is_user_error = False
982
983
def __init__(self, request):
984
BzrNewError.__init__(self)
985
self.request = request
986
987
924
988
class CantReprocessAndShowBase(BzrNewError):
925
989
"""Can't reprocess and show base.
926
990
Reprocessing obscures relationship of conflicting lines to base."""
941
1005
self.filename = filename
942
1006
943
1007
1008
class MediumNotConnected(BzrNewError):
1009
"""The medium '%(medium)s' is not connected."""
1010
1011
def __init__(self, medium):
1012
BzrNewError.__init__(self)
1013
self.medium = medium
1014
1015
944
1016
class MustUseDecorated(Exception):
945
1017
"""A decorating function has requested its original command be used.
946
1018
982
1054
"""Tree transform is malformed %(conflicts)r"""
983
1055
984
1056
1057
class NoFinalPath(BzrNewError):
1058
"""No final name for trans_id %(trans_id)r
1059
file-id: %(file_id)r"
1060
root trans-id: %(root_trans_id)r
1061
"""
1062
1063
def __init__(self, trans_id, transform):
1064
self.trans_id = trans_id
1065
self.file_id = transform.final_file_id(trans_id)
1066
self.root_trans_id = transform.root
1067
1068
985
1069
class BzrBadParameter(BzrNewError):
986
1070
"""A bad parameter : %(param)s is not usable.
987
1071
1234
1318
BadInventoryFormat.__init__(self, msg=msg)
1235
1319
1236
1320
1321
class NoSmartMedium(BzrNewError):
1322
"""The transport '%(transport)s' cannot tunnel the smart protocol."""