~jelmer/bzr-svn/0.6

« back to all changes in this revision

Viewing changes to errors.py

  • Committer: Jelmer Vernooij
  • Date: 2009-07-22 17:22:55 UTC
  • Revision ID: jelmer@samba.org-20090722172255-hn4kkgzbgo2r1m8j
Handle patch change requests that are too large without printing a traceback.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    )
38
38
 
39
39
 
 
40
ERR_RA_DAV_PROPPATCH_FAILED = getattr(subvertpy, "ERR_RA_DAV_PROPPATCH_FAILED", 175008)
 
41
 
 
42
 
40
43
class InvalidBzrSvnRevision(NoSuchRevision):
41
44
    _fmt = """Revision id %(revid)s was added incorrectly"""
42
45
 
116
119
        return ConnectionError(msg=msg)
117
120
    elif num == subvertpy.ERR_RA_DAV_REQUEST_FAILED:
118
121
        return DavRequestFailed(msg)
 
122
    if num == ERR_RA_DAV_PROPPATCH_FAILED:
 
123
        return PropertyChangeFailed(msg)
119
124
    else:
120
125
        return err
121
126
 
247
252
    _fmt = ("Empty branch already exists at /trunk. "
248
253
            "Specify --overwrite or remove it before pushing.")
249
254
 
 
255
 
 
256
class PropertyChangeFailed(BzrError):
 
257
 
 
258
    _fmt = """Unable to set DAV properties: %(msg)s. Perhaps LimitXMLRequestBody is set too low in the server."""
 
259
 
 
260
    def __init__(self, msg):
 
261
        BzrError.__init__(self, msg=msg)