~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-09-16 07:38:10 UTC
  • Revision ID: mbp@sourcefrog.net-20050916073810-1f358be198c9ed91
- fix bug in committing files that are renamed but not modified

- add test for this

Show diffs side-by-side

added added

removed removed

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