@records.command()<EOL>@click.argument('<STR_LIT>', type=click.File('<STR_LIT:r>'), default=sys.stdin)<EOL>@click.option('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', multiple=True)<EOL>@with_appcontext<EOL>def patch(patch, ids):
records_deprecation_warning()<EOL>from .api import Record<EOL>patch_content = patch.read()<EOL>if ids:<EOL><INDENT>for id_ in ids:<EOL><INDENT>rec = Record.get_record(id_).patch(patch_content).commit()<EOL>current_app.logger.info("<STR_LIT>".format(<EOL>rec.revision_id))<EOL>click.echo(rec.id)<EOL><DEDENT>db.session.commit()<EOL><DEDENT>
Patch existing bibliographic record.