~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/option.py

  • Committer: Robert Collins
  • Date: 2005-10-19 06:33:38 UTC
  • Revision ID: robertc@robertcollins.net-20051019063338-45b891502a09911c
The HTTP transport would return NoSuchFile inappropriately.

bzrlib.transport.http has been modified so that only 404 urllib errors
are returned as NoSuchFile. Other exceptions will propogate as normal.
This allows debuging of actual errors. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
 
103
103
 
104
104
def _parse_merge_type(typestring):
105
 
    return get_merge_type(typestring)
 
105
    return bzrlib.commands.get_merge_type(typestring)
106
106
 
107
 
def get_merge_type(typestring):
108
 
    """Attempt to find the merge class/factory associated with a string."""
109
 
    from merge import merge_types
110
 
    try:
111
 
        return merge_types[typestring][0]
112
 
    except KeyError:
113
 
        templ = '%s%%7s: %%s' % (' '*12)
114
 
        lines = [templ % (f[0], f[1][1]) for f in merge_types.iteritems()]
115
 
        type_list = '\n'.join(lines)
116
 
        msg = "No known merge type %s. Supported types are:\n%s" %\
117
 
            (typestring, type_list)
118
 
        raise BzrCommandError(msg)
119
107
 
120
108
class Option(object):
121
109
    """Description of a command line option"""