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

Support bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
    _fmt = "The ref %(ref)s was not found."
42
42
    
43
 
    def __init__(self, ref):
 
43
    def __init__(self, ref, present_refs=None):
44
44
        self.ref = ref
 
45
        self.present_refs = present_refs
 
46
 
 
47
 
 
48
class LightWeightCheckoutsNotSupported(BzrGitError):
 
49
    _fmt = "bzr-git does not support creating lightweight checkouts at the moment."
 
50
 
 
51
 
 
52
def convert_dulwich_error(error):
 
53
    """Convert a Dulwich error to a Bazaar error."""
 
54
 
 
55
    if isinstance(error, git_errors.HangupException):
 
56
        raise bzr_errors.ConnectionReset(error.msg, "")
 
57
    raise error