Commit saved changes to the repository.
    message - commit message
    name    - tag name

def commit(context, message, name):
    """Commit saved changes to the repository.
    message - commit message
    name    - tag name
    """
    context.obj.find_repo_type()
    if context.obj.vc_name == 'git':
        context.obj.call(['git', 'commit', '-a', '-m', message])
    elif context.obj.vc_name == 'hg':
        context.obj.call(['hg', 'commit', '-m', message])
    if name != '' and context.obj.vc_name == 'git':
        context.obj.call(['git', 'tag', '-a', name, '-m', message])
    elif name != '' and context.obj.vc_name == 'hg':
        context.obj.call(['hg', 'tag', '-m', message, name])