~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

mergeĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
        msg = "No known merge type %s. Supported types are:\n%s" %\
156
156
            (typestring, type_list)
157
157
        raise BzrCommandError(msg)
158
 
    
159
 
 
160
 
def get_merge_type(typestring):
161
 
    """Attempt to find the merge class/factory associated with a string."""
162
 
    from merge import merge_types
163
 
    try:
164
 
        return merge_types[typestring][0]
165
 
    except KeyError:
166
 
        templ = '%s%%7s: %%s' % (' '*12)
167
 
        lines = [templ % (f[0], f[1][1]) for f in merge_types.iteritems()]
168
 
        type_list = '\n'.join(lines)
169
 
        msg = "No known merge type %s. Supported types are:\n%s" %\
170
 
            (typestring, type_list)
171
 
        raise BzrCommandError(msg)
172
158
 
173
159
 
174
160
def _builtin_commands():