)]}'
{"smaug/db/sqlalchemy/api.py":[{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"a8e20ff8cd1eaebe59354e1cc88d5c8a1123e562","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def wrapper(context, plan_id, *args, **kwargs):"},{"line_number":161,"context_line":"        plan_get(context, plan_id)"},{"line_number":162,"context_line":"        return f(context, plan_id, *args, **kwargs)"},{"line_number":163,"context_line":"    wrapper.__name__ \u003d f.__name__"},{"line_number":164,"context_line":"    return wrapper"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_a7456243","line":163,"range":{"start_line":163,"start_character":0,"end_line":163,"end_character":33},"updated":"2016-02-08 13:37:09.000000000","message":"use functools.wraps [1]\n\n[1] https://docs.python.org/2.7/library/functools.html?highlight\u003dfunctools%20wraps#functools.wraps","commit_id":"84b0003ba8c391ea823a496782ec5eadeeb2a91a"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4494b90fa6e846baf1934b4275462e1df69648f8","unresolved":false,"context_lines":[{"line_number":160,"context_line":"    def wrapper(context, plan_id, *args, **kwargs):"},{"line_number":161,"context_line":"        plan_get(context, plan_id)"},{"line_number":162,"context_line":"        return f(context, plan_id, *args, **kwargs)"},{"line_number":163,"context_line":"    wrapper.__name__ \u003d f.__name__"},{"line_number":164,"context_line":"    return wrapper"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_073bbaec","line":163,"range":{"start_line":163,"start_character":0,"end_line":163,"end_character":33},"in_reply_to":"5a5ae5dd_a7456243","updated":"2016-02-14 02:40:54.000000000","message":"Done","commit_id":"84b0003ba8c391ea823a496782ec5eadeeb2a91a"},{"author":{"_account_id":2023,"name":"Saggi Mizrahi","email":"ficoos+osreview@gmail.com","username":"ficoos"},"change_message_id":"a8e20ff8cd1eaebe59354e1cc88d5c8a1123e562","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                        the database."},{"line_number":370,"context_line":"    :returns: updated query or None"},{"line_number":371,"context_line":"    \"\"\""},{"line_number":372,"context_line":"    if not joined_load:"},{"line_number":373,"context_line":"        return model_query(context, models.Plan, session\u003dsession,"},{"line_number":374,"context_line":"                           project_only\u003dproject_only)"},{"line_number":375,"context_line":"    return model_query(context, models.Plan, session\u003dsession,"},{"line_number":376,"context_line":"                       project_only\u003dproject_only).\\"},{"line_number":377,"context_line":"        options(joinedload(\u0027resources\u0027))"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def _plan_resources_get_query(context, plan_id, model, session\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a5ae5dd_87daa615","line":377,"range":{"start_line":372,"start_character":4,"end_line":377,"end_character":40},"updated":"2016-02-08 13:37:09.000000000","message":"query \u003d model_query(context, models.Plan, session\u003dsession,\n                     project_only\u003dproject_only)\n if joined_load:\n     query \u003d query.options(jonedload(\u0027resources\u0027))\n\n return query","commit_id":"84b0003ba8c391ea823a496782ec5eadeeb2a91a"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"4494b90fa6e846baf1934b4275462e1df69648f8","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                        the database."},{"line_number":370,"context_line":"    :returns: updated query or None"},{"line_number":371,"context_line":"    \"\"\""},{"line_number":372,"context_line":"    if not joined_load:"},{"line_number":373,"context_line":"        return model_query(context, models.Plan, session\u003dsession,"},{"line_number":374,"context_line":"                           project_only\u003dproject_only)"},{"line_number":375,"context_line":"    return model_query(context, models.Plan, session\u003dsession,"},{"line_number":376,"context_line":"                       project_only\u003dproject_only).\\"},{"line_number":377,"context_line":"        options(joinedload(\u0027resources\u0027))"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def _plan_resources_get_query(context, plan_id, model, session\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"dae33548_e73fb6d4","line":377,"range":{"start_line":372,"start_character":4,"end_line":377,"end_character":40},"in_reply_to":"5a5ae5dd_87daa615","updated":"2016-02-14 02:40:54.000000000","message":"Done","commit_id":"84b0003ba8c391ea823a496782ec5eadeeb2a91a"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"4d053a39e015c6d91bc1fc58ee3922443991dc9d","unresolved":false,"context_lines":[{"line_number":437,"context_line":"    with session.begin():"},{"line_number":438,"context_line":"        session.add(plan_ref)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    return _plan_get(context, values[\u0027id\u0027], session\u003dsession)"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_21cee162","line":440,"updated":"2016-02-18 07:46:19.000000000","message":"Can the session still be used out of the with statement above?\nMaybe put this line within the with statement better?","commit_id":"0ad3674a122af20be4e7ede753b122d1f1a1faf4"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"86eb8529ee075a8eea89dcd112fdb8135d08b8b6","unresolved":false,"context_lines":[{"line_number":437,"context_line":"    with session.begin():"},{"line_number":438,"context_line":"        session.add(plan_ref)"},{"line_number":439,"context_line":""},{"line_number":440,"context_line":"    return _plan_get(context, values[\u0027id\u0027], session\u003dsession)"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_3c5d6815","line":440,"in_reply_to":"dae33548_21cee162","updated":"2016-02-18 08:07:19.000000000","message":"I think needn\u0027t put _plan_get in the with statement above.","commit_id":"0ad3674a122af20be4e7ede753b122d1f1a1faf4"},{"author":{"_account_id":16203,"name":"zengyingzhe","email":"zengyingzhe@huawei.com","username":"zengyingzhe"},"change_message_id":"4d053a39e015c6d91bc1fc58ee3922443991dc9d","unresolved":false,"context_lines":[{"line_number":463,"context_line":"                    \u0027updated_at\u0027: literal_column(\u0027updated_at\u0027)})"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"@require_context"},{"line_number":467,"context_line":"def plan_update(context, plan_id, values):"},{"line_number":468,"context_line":"    session \u003d get_session()"},{"line_number":469,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_c66f4bfa","line":466,"updated":"2016-02-18 07:46:19.000000000","message":"missing @require_plan_exists?","commit_id":"0ad3674a122af20be4e7ede753b122d1f1a1faf4"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"86eb8529ee075a8eea89dcd112fdb8135d08b8b6","unresolved":false,"context_lines":[{"line_number":463,"context_line":"                    \u0027updated_at\u0027: literal_column(\u0027updated_at\u0027)})"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"@require_context"},{"line_number":467,"context_line":"def plan_update(context, plan_id, values):"},{"line_number":468,"context_line":"    session \u003d get_session()"},{"line_number":469,"context_line":"    with session.begin():"}],"source_content_type":"text/x-python","patch_set":4,"id":"dae33548_dcdc3c48","line":466,"in_reply_to":"dae33548_c66f4bfa","updated":"2016-02-18 08:07:19.000000000","message":"Adding @require_plan_exists is not a must here. Before calling   update,get_by_id will be called. I will add this wrapper.It is better.","commit_id":"0ad3674a122af20be4e7ede753b122d1f1a1faf4"}],"smaug/db/sqlalchemy/models.py":[{"author":{"_account_id":18266,"name":"zengchen","email":"chenzeng2@huawei.com","username":"zengchen"},"change_message_id":"90f908521f4d8d75b7111751c98251b1e7620837","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    connection is lost and needs to be reestablished."},{"line_number":97,"context_line":"    \"\"\""},{"line_number":98,"context_line":"    from sqlalchemy import create_engine"},{"line_number":99,"context_line":"    models \u003d (Service,)"},{"line_number":100,"context_line":"    engine \u003d create_engine(CONF.database.connection, echo\u003dFalse)"},{"line_number":101,"context_line":"    for model in models:"},{"line_number":102,"context_line":"        model.metadata.create_all(engine)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_fd614706","line":99,"range":{"start_line":99,"start_character":14,"end_line":99,"end_character":21},"updated":"2016-02-18 02:54:46.000000000","message":"do you forget adding the tables at here?","commit_id":"d155ae4ff0680f92703876f44cbe55305d9badf9"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"3b71852e9b4e5149734abaeb9c62c6492fb6a14c","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    connection is lost and needs to be reestablished."},{"line_number":97,"context_line":"    \"\"\""},{"line_number":98,"context_line":"    from sqlalchemy import create_engine"},{"line_number":99,"context_line":"    models \u003d (Service,)"},{"line_number":100,"context_line":"    engine \u003d create_engine(CONF.database.connection, echo\u003dFalse)"},{"line_number":101,"context_line":"    for model in models:"},{"line_number":102,"context_line":"        model.metadata.create_all(engine)"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_d838d1d5","line":99,"range":{"start_line":99,"start_character":14,"end_line":99,"end_character":21},"in_reply_to":"dae33548_fd614706","updated":"2016-02-18 02:59:14.000000000","message":"Done","commit_id":"d155ae4ff0680f92703876f44cbe55305d9badf9"}]}
